Push Nuget Package to intranet Nuget Packages server

Hello,

I'm trying to push TMS.FlexCel NuGet package to intranet Nuget Packages Server. All the time I get an error "Response status code does not indicate success: 406 (Not Acceptable)."

TMS.FlexCel.WinForms and TMS.FlexCel.WebForms packages were pushed without errors.

The version of the intranet Nuget Server is 3.2.1, version of Nuget.exe is 5.3.1. What could be a reason?

Hi,
To be honest I don't really know, but googling for the error I found this:

I was receiving a 406 error with only a specific package.
It turns out the package was larger than the 30MB asp.net limit set in web.config of the nuget server. Increasing the value of maxRequestLength in the httpRuntime element fixed the issue for me.

From https://github.com/NuGet/NuGetGallery/issues/5084

Could this be the case? FlexCel nupackage is 31 mb, so maybe it is the reason it is failing and the others don't?

Exactly, thank you.

Changing the maxAllowedContentLength parameter fixed the issue

 <security>
      <requestFiltering>
        <!-- maxAllowedContentLength is specified in Bytes -->
        <requestLimits maxAllowedContentLength="51457280" />
      </requestFiltering>
    </security>

Another solution, I have found, is to put the package directly to the root of the Packages folder on the NuGet server. After that NuGet Server automatically copies the package to the correct location.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.