0

I'm trying to set up the Nuget in our new build server ( Windows Server 2012 Standard). I have set it up as a website in IIS(V 8.5).

Nuget commands like Get-Package and Install-Package works fine, but nuget push throwing 404 resource not found . Part of the web.config, Have added the ExtensionlessUrlHandler-Integrated-4.0 with the verb "GET,HEAD,POST,PUT,DEBUG".

I have done the same thing in my local machine ( Windows 7, IIS 7.5) and nuget push works as expected.

would appreciate any help in resolving this.

Thank you.

VeeYemYem
  • 5
  • 6
  • Made sure that the application pool is set to integrated. And the same setting and code works fine in IIS 7.5. Not sure whether I need to do anything different in IIS 8.5 – VeeYemYem May 09 '17 at 14:05

1 Answers1

0

We are using Classic Mode for the app pool. I was getting the 404 even though we had verb="*". We had to go in and specifically allow PUT requests for the app. The web.config was modified in the < handlers > section which is within the < system.webServer > section with the following:

<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />  

<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />  

For reference the following is what we replaced (the default value) that was still giving 404 errors:

<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
dan-iel
  • 801
  • 8
  • 4