Which permissions are required to enable process.start via asp.net application?

后端 未结 2 687
忘了有多久
忘了有多久 2021-01-20 17:54

I have an asp.net application which uses process.start to call an executable (Graphviz). All works well in my development environment, but when I move to production I\'m no

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-20 18:12

    Locate your pool under which your site is run, and see under which user is running.

    If you can't do that you can run this code to see the user that your pool is running:

    var user = System.Security.Principal.WindowsIdentity.GetCurrent().User;
    var userName = user.Translate(typeof(System.Security.Principal.NTAccount));
    

    And then give permission to that user to be able to run these files.

    reference: How to find out which account my ASP.NET code is running under?

提交回复
热议问题