coder
coder

Reputation: 987

Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)

I am trying to upload files and convert them to another format before saving them on my web server, but I get the following error: System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start()

There was no problem when I tried to do this on my local machine's web server (Windows 7), but I am getting this error after deploying my website to my web hosting provider, which has Windows Server 2008 R2.

I am using ASP.NET c#. I'm guessing it's a permissions issue, but I'm not sure how to elevate any permissions. Please help!

Upvotes: 6

Views: 30017

Answers (3)

santhoush sankar
santhoush sankar

Reputation: 11

This should fix your Issue

Changes in IIS --> Application Pool --> Advances Setting --> (Proccess Module) Load user Profile change --> Set as True.

Settings

Upvotes: 0

mcmillab
mcmillab

Reputation: 2814

you can also get this error if you attempt to start a Directory, rather than a File.

Upvotes: 8

Haukman
Haukman

Reputation: 3776

I doubt you can give permissions to execute programs to the standard ASPNET user (and it would be bad practice as well). A better option (short of not starting a process) would be to change the user of the Application Pool to a local user on the server that has permissions to execute the process (preferable a non-admin account). Be aware that the process you start can't have any UI components since you won't see it running.

Upvotes: 4

Related Questions