注意:win+R 后cmd
1:解除锁定 handlers modules 两个模块的锁定 %windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/handlers %windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/modules 2:注册iis C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i 3:webconfig <system.webServer> 节点 添加 <!--以下配置为了让IIS7+支持Put/Delete方法--> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS" /> <add name="Access-Control-Allow-Headers" value="Content-Type" /> </customHeaders> </httpProtocol> <validation validateIntegratedModeConfiguration="false" /> <modules runAllManagedModulesForAllRequests="true"> <remove name="WebDAVModule" /> </modules> 4:增加映射模块引入isapi处理模块 <system.webServer>下<handlers>节点添加 <add name="all" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32" /> <add name="html" path=".html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
注意:如果如上步骤还不行,删除第三步中的
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
</modules>