django iis

Microsoft IIS creates something called AppPool. By default you will have a user IIS AppPoolDefaultAppPool. 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 AppPoolDefaultAppPool or whatever app pool you're using

Restart your server and test again

Edit


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

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

原文地址:https://www.cnblogs.com/pythonClub/p/15350066.html