Question

I have a very basic ASP.NET (.NET 4) forms application. This application is designed to control some items on the server.

One of the things I do is launch URIs on the server using Process.Start(uri);. During development, on my dev PC, it launches the process/URI just fine and works great. But when I try to launch the URI on the server, I get this error:

Unknown error (0x80041002)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.Win32Exception: Unknown error (0x80041002)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Win32Exception (0x80004005): Unknown error (0x80041002)]
System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfostartInfo) +773
System.Diagnostics.Process.Start() +123
System.Diagnostics.Process.Start(ProcessStartInfo startInfo) +49 ...

If I take the same URI that I'm trying to launch from my website and put it into the Run box on the server directly, the application starts without any problems.

My dev machine is Windows 8 and my web server is Windows Server 2008R2.

Was it helpful?

Solution

Try checking the user or service that is running the application pool has permission to execute the command(s) you need. It could simply be a permission problem.

I wouldn't expect anything to occur in the UI session if you are logged onto the machine at the same time though. The user running the service is only a process and is run and monitored by IIS.

You should see the process starting and ending if you open the task manager and check the option to show all processes for all users. This would be similar to running a database job and expecting to see the SSIS package open/run etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top