Hi,
I'm developing a web page application that runs 2 processeses. These
two process create postcript files, the first one creates a map and
the second one overlays data over that map.

Apparently my application was working fine when I ran it with microsoft
webmatrix server; however eventually I used IIS to run the
application but only one process ran (The first) I'm using windows xp pro btw...

Here's the code that I have:


public void CreateMapM(object sender, EventArgs e)
{
string programName1 ="pscoast.exe";
string programName2 = "psxy.exe";

string arg1 = @"-Jq-95/1:52000000 -R-130/-50/10/50
-B10g5 -G210/180/140";
arg1 += @"\ -I1/1/0/0/255 -K -N1 -N2 -P -S0/0/255
-W2/0/0/255";
arg1 += @" > c:\inetpub\wwwroot\temp\test.ps";



string arg2 = @"-R -Jq -O ";
arg2 +=
@"c:\inetpub\wwwroot\temp\gravitydata.dat";
arg2 += @" -G0/255/255 -Sc0.05c";
arg2 += @">> c:\inetpub\wwwroot\temp\TEMPO.ps";


//Create new processes info structure

ProcessStartInfo pscoastInfo = new ProcessStartInfo();


//Set the file name and arguments to each process

pscoastInfo.FileName = programName1;
pscoastInfo.Arguments = arg1;
pscoastInfo.RedirectStandardOutput = true;
pscoastInfo.UseShellExecute = false;



//Start pscoast process

Process pscoast = Process.Start(pscoastInfo);
string output1 = pscoast.StandardOutput.ReadToEnd();
pscoast.WaitForExit();

// Write pscoast process output
// to file

FileStream fs1 = new
FileStream(@"c:\inetpub\wwwroot\temp\TEMPO.ps",FileMode.Create,
FileAccess.Write);
StreamWriter w1 = new StreamWriter(fs1);
w1.Write(output1);

w1.Close();
fs1.Close();

ProcessStartInfo psxyInfo = new ProcessStartInfo();

//Set the file name and arguments of psxy process

psxyInfo.FileName = programName2;
psxyInfo.Arguments = arg2;
psxyInfo.RedirectStandardOutput = true;
psxyInfo.UseShellExecute = false;

//Start process psxy

Process psxy = Process.Start(psxyInfo);
string output2 = psxy.StandardOutput.ReadToEnd();
psxy.WaitForExit();

// Write psxy process output
// to file

FileStream fs2 = new
FileStream(@"c:\inetpub\wwwroot\temp\TEMPO.ps",FileMode.Append,FileAccess.Write);
StreamWriter w2 = new StreamWriter(fs2);
w2.Write(output2);

w2.Close();
fs2.Close();

}

Thanks in advance,

Jorge.

RE: URGENT: IIS vs. webmatrix server by timcof

timcof
Tue Sep 02 02:31:59 CDT 2003

Post your code to that appropriate group.
Make sure that you have .exe set within the directory in IIS that the .exe live in. Also, if you have URLSCAN installed, make sure it is
set to allow .exe (by default, it is not). And, make sure the IWAM account has access to run the .exe via NTFS. Run filemon from
www.sysinternals.com to see if there is an access denied somewhere.

Thank you. I hope this information is helpful.

Tim Coffey [MSFT]

This posting is provided ?AS IS? with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft
Corporation. All rights reserved.
--------------------
| From: jrasillo@utep.edu (Jorge)
| Newsgroups: microsoft.public.inetserver.iis
| Subject: URGENT: IIS vs. webmatrix server
| Date: 22 Aug 2003 09:38:52 -0700
| Organization: http://groups.google.com/
| Lines: 95
| Message-ID: <6104bf32.0308220838.39136b34@posting.google.com>
| NNTP-Posting-Host: 129.108.5.227
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1061570332 2734 127.0.0.1 (22 Aug 2003 16:38:52 GMT)
| X-Complaints-To: groups-abuse@google.com
| NNTP-Posting-Date: 22 Aug 2003 16:38:52 GMT
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.com!news.maxwell.syr.edu!sn-xit-03!sn-xit-
01!sn-xit-09!supernews.com!postnews1.google.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.inetserver.iis:272019
| X-Tomcat-NG: microsoft.public.inetserver.iis
|
| Hi,
| I'm developing a web page application that runs 2 processeses. These
| two process create postcript files, the first one creates a map and
| the second one overlays data over that map.
|
| Apparently my application was working fine when I ran it with microsoft
| webmatrix server; however eventually I used IIS to run the
| application but only one process ran (The first) I'm using windows xp pro btw...
|
| Here's the code that I have:
|
|
| public void CreateMapM(object sender, EventArgs e)
| {
| string programName1 ="pscoast.exe";
| string programName2 = "psxy.exe";
|
| string arg1 = @"-Jq-95/1:52000000 -R-130/-50/10/50
| -B10g5 -G210/180/140";
| arg1 += @"\ -I1/1/0/0/255 -K -N1 -N2 -P -S0/0/255
| -W2/0/0/255";
| arg1 += @" > c:\inetpub\wwwroot\temp\test.ps";
|
|
|
| string arg2 = @"-R -Jq -O ";
| arg2 +=
| @"c:\inetpub\wwwroot\temp\gravitydata.dat";
| arg2 += @" -G0/255/255 -Sc0.05c";
| arg2 += @">> c:\inetpub\wwwroot\temp\TEMPO.ps";
|
|
| //Create new processes info structure
|
| ProcessStartInfo pscoastInfo = new ProcessStartInfo();
|
|
| //Set the file name and arguments to each process
|
| pscoastInfo.FileName = programName1;
| pscoastInfo.Arguments = arg1;
| pscoastInfo.RedirectStandardOutput = true;
| pscoastInfo.UseShellExecute = false;
|
|
|
| //Start pscoast process
|
| Process pscoast = Process.Start(pscoastInfo);
| string output1 = pscoast.StandardOutput.ReadToEnd();
| pscoast.WaitForExit();
|
| // Write pscoast process output
| // to file
|
| FileStream fs1 = new
| FileStream(@"c:\inetpub\wwwroot\temp\TEMPO.ps",FileMode.Create,
| FileAccess.Write);
| StreamWriter w1 = new StreamWriter(fs1);
| w1.Write(output1);
|
| w1.Close();
| fs1.Close();
|
| ProcessStartInfo psxyInfo = new ProcessStartInfo();
|
| //Set the file name and arguments of psxy process
|
| psxyInfo.FileName = programName2;
| psxyInfo.Arguments = arg2;
| psxyInfo.RedirectStandardOutput = true;
| psxyInfo.UseShellExecute = false;
|
| //Start process psxy
|
| Process psxy = Process.Start(psxyInfo);
| string output2 = psxy.StandardOutput.ReadToEnd();
| psxy.WaitForExit();
|
| // Write psxy process output
| // to file
|
| FileStream fs2 = new
| FileStream(@"c:\inetpub\wwwroot\temp\TEMPO.ps",FileMode.Append,FileAccess.Write);
| StreamWriter w2 = new StreamWriter(fs2);
| w2.Write(output2);
|
| w2.Close();
| fs2.Close();
|
| }
|
| Thanks in advance,
|
| Jorge.
|