You must Sign In to post a response.
  • Category: ASP.NET

    System.Diagnostics.Process.Start(file.FullName); Not working in iis

    Hai,
    here the command not working "System.Diagnostics.Process.Start(file.FullName)"; Not working in iis but working in local system. Can one give me the idea.



    Regards,
    Vijay
  • #767199
    hi,
    It will not work because your application is runnign on server and it may not have access to the process you are trying to run as like client context.

    1.
    Open Control Panel-> click Administrative Tools and then click Services.
    Double-click IIS Admin Service.
    On the Log On tab, select the Allow Service to Interact with Desktop check box. Remember to run IIS Admin Service as a local system.
    Stop and restart the IIS Admin Service.

    2.
    Goto IIS Manager.
    Select your Application Pool.
    Right click--> Advanced Settings.
    Change value of 'Identity' Variable to-> LocalSystem
    Restart IIS.

  • #767203
    Do you want to run that file on client or on server ? ,if you want to run it on client then 'Process.Start' will not help you more, When you run 'Process.Start' using asp.net it will run on server only and open file at server not on client.
    If you want to run file on server then you can use it but it needs additional access permission to run it
    user Impersonation in web.config as below

    < identity impersonate="true" userName="domain\user" password="password" />

    use local server administrator and password

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]


  • Sign In to post your comments