RE: P.S --RE: Process won't run



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
.



Relevant Pages

  • Re: Some users are unable to access a site in sharepoint
    ... permission levels or groups on the sharepoint site? ... bstrUrl, String& pbstrServerRelativeUrl, String& pbstrTitle, String& ... I know it is some type of permissions issue because if I adde one of the ... users account to the administrators group on the sharepoint web servers ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Cbool problem
    ... Once I input a good sample string it ran correctly. ... > permissions to write to the directory. ... > "Joe Fallon" wrote in message ... >> I am now trying to use dynamic code execution in an ASP.Net application. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Property userAccountControl not found
    ... All user objects in AD have a userAccountControl attribute. ... Note that in the membership provider, it does not use the permissions of the user who was authenticated to search the directory. ... containerEntry, String filter, SearchScope searchScope, Boolean ... retrieveSAMAccountName, DirectoryEntry& userEntry, Boolean& ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Login failed for user
    ... I'm using the same connect string as on all my other sites. ... The DB owner is 'chic' and the schema name is 'abn'. ... View schema permissions> View database permissions> Effective ...
    (microsoft.public.sqlserver.programming)
  • Webdav and S:security_descriptor problem
    ... I writed class for updateing public folder security permissions. ... When I added permissions for user it work fine in debuging mode of VS.NET ... private string AddACE( ... System.Xml.XmlNode newNode = XMLRoot.ImportNode; ...
    (microsoft.public.exchange.development)