Internal NuGet Server on IIS 7.5

Jun 14, 2011 at 7:38 PM
Edited Jun 16, 2011 at 1:25 PM

I'm working on setting up an internal NuGet server and I've been having some issues.  Where I work all development needs to be performed on a seperate network from production.  So, my development environment is a closed network, with no internet access.  While I've gotten a download of all nuget packages, I wanted to use the method described in Phil Haack's post about setting up a local NuGet feed.  It looked simple enough, so I followed the instructions and ran into several issues.

At first, I just ran it through Visual Studio and it worked great, the feed showed the few packages I tossed in the folder.  So I thought it would work great.  I published it out to my development web server via FTP and added it as an application, in a folder named nuget.  But the data services tries to map to /nuget/nuget/packages and returns nothing.  So, I assumed it really should exist at a root level.  And decided to give it a subdomain site.  So I simply added an additional site into IIS 7.5, which ended up being (dev.lab is the internal domain).  After hassling with some application pool issues, I recreated the site and gave it it's own app pool (still learning iis 7/7.5). 

At this point it worked, and the feed showed up but wasn't showing any packages.  Which I discovered VS didn't copy them over in the ftp deployment.  So, I dropped the packages into the folder and the feed came back with an error.

Object reference nto set to an instance of an object

System.NullReferenceException at NuGet.Server.Infrastructure.ServerPackageRepository.CalculateDerivedData(string path) at NuGet.Server.Infrastructure.ServerPackageRepository.OpenPackage(String path) at NuGet.LocalPackageRepository.GetPackage(Func`2 openPackage, String path) at NuGet.LocalPackageRepository.<GetPackages>d__0.MoveNext() at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Data.Services.DataService`1.SerializeResponsebody(RequestDescription description, IDataService dataService) at System.Data.Services.DataService`1.HandleRequest()

As for IIS, I originally had Windows Authentication running, but switched to anonymous.  I made sure .Net v4.0 is turned on and that .nupkg is properly mapped.

I've been at this for a little while, and I'm just scratching my head to the problem.  Considering it works on the local run copy from VS2010.

Any help would be appreciated.


Jun 15, 2011 at 7:21 PM

Not that I'm going to be tremendous help, but I setup a network share folder to be my Nuget repository. I can install, update packages through the GUI or command line without issue, I haven't encountered any reason yet that the share folder is not sufficient for enterprise usage of nuget.

Jun 15, 2011 at 9:00 PM

Are you using the latest version of nuget server?

Jun 16, 2011 at 1:25 PM
dfowler wrote:

Are you using the latest version of nuget server?

Yes, using version 1.3.2.  I downloaded all current packages and the latest version of Nuget before creating this.

And I had been using a local share before in order to install packages via the console.  Which I agree works just fine, but on occasions I want to use the GUI portion, which is incredibly slow with more than just a few packages in a folder.   A simple feed (at least I'm hoping) would be far quicker, plus I would eventually like to extend it further and improve upon it.  Starting with just a simple feed was my goal and then adding to it later.