django iis

 

Microsoft IIS creates something called AppPool. By default you will have a user IIS AppPool\DefaultAppPool. That user needs to have permissions to your database and other necessary files to read and write.

If they do not, it will return the 500 error. You can look at this clip here to see how to fix the error Django on IIS with 500 error.

In order to give permissions you can follow these steps

Right-click your Django project folder

Properties --> Security

Edit --> Add: IIS AppPool\DefaultAppPool or whatever app pool you're using

Restart your server and test again

Edit


要取消锁定可以以管理员身份运行命令行 %windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/handlers 。其中的 handlers 是错误信息中红字显示的节点名称。

如果modules也被锁定,可以运行%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/modules

posted @ 2021-09-28 21:08  CrossPython  阅读(38)  评论(0编辑  收藏  举报