搭建Nuget.Server push时,"Failed to process request. 'Method Not Allowed'"
环境:
windows server 2012,已经安装web dev工具。
nuget.server版本2.11
输入网站地址正常访问:
VS也能正常添加,nuget服务,在项目打包后上传服务器时报:
解决办法:
打开web.config.找到<system.webServer><modules>节点,在里面添加
<remove name="WebDAVModule" />
<remove name="WebDAV" />
即:
<system.webServer> <staticContent> <mimeMap fileExtension=".nupkg" mimeType="application/zip" /> </staticContent> <modules runAllManagedModulesForAllRequests="true"> <remove name="WebDAVModule" /> <remove name="WebDAV" /> </modules> </system.webServer>