13

I'm trying to run a local install of Nuget Gallery but get a 500 error related to a bad config file. However, this only happens when running from IIS. If I run from IIS Express it works fine. Can anyone give me any pointers?

Error Summary
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information
Module  IIS Web Core
Notification    BeginRequest
Handler Not yet determined
Error Code  0x8007000d
Config Error    
Config File \\?\C:\inetpub\NuGetGallery\Website\web.config
Requested URL   http:\\[localhost]:80/Nuget
Physical Path   C:\inetpub\NuGetGallery\Website
Logon Method    Not yet determined
Logon User  Not yet determined
Config Source
   -1: 
    0: 
Kev
  • 118,037
  • 53
  • 300
  • 385
devlife
  • 15,275
  • 27
  • 77
  • 131
  • Do you mean running on IIS on the same machine as IIS Express? – Kev Aug 25 '12 at 01:33
  • @Kev yes IIS Express was installed with Visual Studio. – devlife Aug 27 '12 at 13:02
  • Ok...1. what version of Visual Studio 2. what framework version are you targeting 3. What framework version is the IIS site's application pool configured to use? – Kev Aug 27 '12 at 13:04
  • 1. VS 2010 SP1, 2. .NET 4, 3. .NET 4. It just seems like it can't find the config file: This is the path it's looking for: Config File \\?\C:\inetpub\NuGetGallery\Website\web.config. The first 4 characters seem weird. – devlife Aug 27 '12 at 13:32
  • Can you post the `web.config` file here or somewhere (minus any passwords/hostnames in connection strings etc). – Kev Aug 27 '12 at 13:41

4 Answers4

19

This has got to be the worst error message ever. Url Rewrite Module wasn't installed. Works fine now.

devlife
  • 15,275
  • 27
  • 77
  • 131
  • 1
    It seems the Url Rewrite Module is not required, have a look at these posts: [Hosting the NuGet Gallery Locally in IIS](https://github.com/NuGet/NuGetGallery/wiki/Hosting-the-NuGet-Gallery-Locally-in-IIS) and [How to Set Up a Local NuGet Gallery](http://dotnet.dzone.com/news/how-set-local-nuget-gallery) – Schalk Dec 11 '12 at 11:53
2

To run NuGet Gallery, you need the following prerequisites (which contains the URL Rewrite Module):

  • VS 2010 or higher
  • PowerShell 2.0
  • NuGet Package Manager
  • Windows Azure SDK
H A
  • 1,251
  • 2
  • 24
  • 39
2

Came across this today and the URL Rewrite was the blocker as well. So first thing I did was go to Windows Features and tried to enable this feature for Internet Information Services but noticed that it wasn't there ( for Windows 8.1 and IIS 8.5 ) :(

So, as a side note, the best way to enable the module is to use the Web Platform Installer, find the module by searching for "rewrite" and just install it.

Nuget Gallery is working for me now. I should really change their documentation on Git and contribute to this..

Dejan Vasic
  • 662
  • 7
  • 17
0

You can try to comment whole <rewrite> section in your Web.config. It's work for me.

Dariusz
  • 15,573
  • 9
  • 52
  • 68