System.Diagnostics.Process.Start work in asp.net but not in IIS7

Hi friends,

recently i am working in project and find that when i try to execute any command using System.Diagnostics.Process.Start it will work in my development area but when i deploy in IIS it not work.

i really find many solutions like
1. in services under controlpanel tick checkbox “Allow services to use desktop” for IIS Service admin but not work.
2. change apppool to local system but again not work.

and many more solution..

finally i knew that to execute some commands need to start cmd as administrator
so i change my code like this


process.startinfo.IsExecuteShell = true;
process.startinfo.Domain = ""; // Domain of IIS Computer
process.startinfo.UserName = ""; //Administrator for that computer
process.startinfo.Passwork = ""; //Password

Hope this will help…………

Advertisements

About Asif
Hello Friends… I have done my Bachelor of Engineering in Information Technology from Gujarat University. I have 1.7 years experience of web and windows based application development.. My basic idea to start a blog is to store all important link which help me in my application and access to every where. Also this information is help others who want to makes their application powerful. I am interested in .net framework (1.0,2.0,3.0,3.5 and more). This blog contain also many information related to SQL, Custom Controls in C#.net Please share your ideas and any query if you have...

One Response to System.Diagnostics.Process.Start work in asp.net but not in IIS7

  1. mohamadz14 says:

    hi Asif and tanks for your usefull post ..

    im executing the below code in the iis7 server:
    Process.Start(“notepad”);

    the problem : the notepad program starts (you can see it in the task manager)
    but it doesnt start in the desktop (it has no user interface)

    can you help me with this isue
    any help will be appreciated

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: