ASP.Net which user account running Web Service on IIS 7?

后端 未结 5 420
名媛妹妹
名媛妹妹 2020-12-05 13:16

I want to know which account running my Web Service/Application so that I can assign the read/write access to that account. I have researched and see most of the sources men

相关标签:
5条回答
  • 2020-12-05 13:20

    I had a ton of trouble with this and then found a great solution:

    Create a file in a text editor called whoami.php with the below code as it's content, save the file and upload it to public_html (or whatever you root of your webserver directory is named). It should output a useful string that you can use to track down the user the webserver is running as, my output was "php is running as user: nt authority\iusr" which allowed me to track down the permissions I needed to modify to the user "IUSR".

    <?php
      // outputs the username that owns the running php/httpd process
      // (on a system with the "whoami" executable in the path)
      echo 'php is running as user: ' . exec('whoami');
    ?>
    
    0 讨论(0)
  • 2020-12-05 13:24

    Server 2008

    Start Task Manager Find w3wp.exe process (description IIS Worker Process) Check User Name column to find who you're IIS process is running as.

    In the IIS GUI you can configure your application pool to run as a specific user: Application Pool default Advanced Settings Identity

    Here's the info from Microsoft on setting up Application Pool Identites:

    http://learn.iis.net/page.aspx/624/application-pool-identities/

    0 讨论(0)
  • 2020-12-05 13:38

    You are most likely looking for the IIS_IUSRS account.

    0 讨论(0)
  • 2020-12-05 13:43

    You have to find the right user that needs to use temp folder. In my computer I follow the above link and find the special folder c:\inetpub, that iis use to execute her web services. I check what users could use these folder and find something like these: computername\iis_isusrs

    The main issue comes when you try to add it to all permit on temp folder I was going to properties, security tab, edit button, add user button then i put iis_isusrs

    and "check names" button

    It doesn´t find anything The reason is the in my case it looks ( windows 2008 r2 iis 7 ) on pdgs.local location You have to go to "Select Users or Groups" form, click on Advanced button, click on Locations button and will see a specific hierarchy

    • computername
    • Entire Directory
      • pdgs.local

    So when you try to add an user, its search name on pdgs.local. You have to select computername and click ok, Click on "Find Now"

    Look for IIS_IUSRS on Name(RDN) column, click ok. So we go back to "Select Users or Groups" form with new and right user underline

    click ok, allow full control, and click ok again.

    That´s all folks, Hope it helps,

    Jose from Moralzarzal ( Madrid )

    0 讨论(0)
  • 2020-12-05 13:44

    Look at the Identity of the Application Pool that's running your application. By default it will be the Network Service account, but you can change this.

    At least that's how it works on 2003 server, don't know if some details have changed for 2008 server.

    0 讨论(0)
提交回复
热议问题