how to grant write permissions to an web api application in IIS?

后端 未结 2 1225
夕颜
夕颜 2020-12-17 00:40

I simply have a web api application on IIS server that simply writes to text file on C:\\FileStorage\\test.txt however when I call this webservice I get the internal 500 err

相关标签:
2条回答
  • 2020-12-17 01:20

    Grant permissions for that folder to the application pool. So you'd go to the C:\FileStorage folder in Windows and edit permissions, and add IIS APPPOOL\appPoolNameHere as a user, then give it full permissions.

    Hope that helps.

    EDIT

    Step by Step Instructions...

    -Open Windows Explorer

    -Browse to your folder

    -Right click the folder and go to Properties

    -On the Security tab click Edit

    -Click Add

    -Under Locations, make sure it is pointing at your local machine, not a domain

    -For the object name, enter below but replace MyAppPool with the name of your application pool...

    IIS APPPOOL\MyAppPool

    -Set the permissions to Full, or just add Write, or whatever you need.

    0 讨论(0)
  • 2020-12-17 01:42

    or you can repalce APPPOOL to the name of your server or computer and with the IIS_ISURS. example:

    yourserver\IIS_IUSRS
    

    See this Screen Shot

    screenshot

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