RE: P.S --RE: Process won't run
- From: Peter Bromberg [C# MVP] <pbromberg@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Mar 2006 15:33:02 -0800
Couple ideas here:
1) try doing this the "easy way"
Process.Start("C:\Inetpub\wwwroot\Uniformity\ProcessStuff\WtDistrib.exe")
If that doesn't work, you may have a permissions issue. ASP.NET by default
runs under weak credentials. You could add
<identity impersonate="true" userName="strongaccountname" password = "pass" />
to the web.config.
Where "strongaccountname" is an account that you know has permission to
execute in the respective directory.
Hope that helps,
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Caroline" wrote:
Correction. The error reads, "No process is associated with this object.".
"Caroline" wrote:
I dropped the Process return type.
When I step through, an exception is thrown at
WtDistrib.WaitForExit()
"No thread is associated with this process."
The example I posted is only one of several that I have tried. This is my
first asp.net application.
"Peter Bromberg [C# MVP]" wrote:
Don't use Console.WriteLine in a method that's supposed to work in an ASP.NET
web app.
You could use System.Diagnostics.Debug.WriteLine if you want.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Caroline" wrote:
I am building a web application to gather user information then launch a
process to calculate results. The process is a 3rd Party executable. I
cannot get the process to start. Is there a problem with this code?
Public Overloads Shared Function StartApplication(ByVal fileName As String,
ByVal myPath As String) As Process
Try
Dim WtDistrib As New Process
WtDistrib.StartInfo.Verb = "Execute"
WtDistrib.StartInfo.CreateNoWindow = True
Dim SI As New
ProcessStartInfo("C:\Inetpub\wwwroot\Uniformity\ProcessStuff\WtDistrib.exe")
WtDistrib.Start(SI)
WtDistrib.WaitForExit()
Console.WriteLine(WtDistrib.ExitCode)
Console.WriteLine("WtDistrib.exe was closed at: " &
WtDistrib.ExitTime & ".")
WtDistrib.Close()
Catch e As Exception
Debug.Write("Error: " + e.Message)
Console.WriteLine("The following exception was raised: " +
e.Message)
End Try
End Function
- Follow-Ups:
- RE: P.S --RE: Process won't run
- From: "Yuan Ren[MSFT]"
- RE: P.S --RE: Process won't run
- Prev by Date: Dataset designer and multiple resultsets from stored proc
- Next by Date: Re: IIS ASP.NET 2.0 Bug
- Previous by thread: Dataset designer and multiple resultsets from stored proc
- Next by thread: RE: P.S --RE: Process won't run
- Index(es):
Relevant Pages
|