404 Errors When Upgrading ASP.NET 3.5 Web Sites to ASP.NET 4.0

by jmorris 20. October 2010 16:19

After upgrading our projects from Visual Studio 2008 to Visual Studio 2010 and modifying our deployment scripts to to use the 4.0 compiler, we ran into another issue with HTTP 404 errors after deploying to our development environment:

image

Running through the checklist:

  • Is ASP.NET 4.0 Installed? Check!
  • Is ASP.NET 4.0 running? Check!
  • Is IIS running? Check!
  • Is the source code deployed? Check!
  • Is the Web site configured properly in inetmgr? Check!
  • Any host file entries causing problems? No. Check!

Blah, what could be causing this? A comrade of mine (thanks Scott) figured this one out: you have to enable IIS to run the ASP.NET 4.0 extension:

image

To do enable the ASP.NET 4.0 Extensions, do the following:

  1. Fire up intemgr: Start=>Run=>”Inetmgr”
  2. Select the “Web Services Extension” folder
  3. Locate the ASP.NET v4.0.X entry
  4. Right click on it and select “Allow”

That’s it!

Tags: , , , ,

ASP.NET

How to fix: "Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding" Errors

by jmorris 24. June 2010 14:30

After deploying a project from development environment running off of the VS development Web server Cassini to a production box using IIS, I noticed that all of my WCF service were all failing with the same HTTP 500 error:

The problem is that IIS needs to determine which base address in the bindings to host the service. However, WCF services only allows one service hosted under a site to be bound to one base address for a scheme. In situations where you have multiple services being hosted under a single site, the binding must specify a base address to use filter requests to t he specific service.

To resolve the issue, simple provide the base address in the baseAddressPrefixFilters section of the web.config:

By adding the prefix above, only requests with the specified base address above will be passed through. All others will be blocked and a HTTP 500 error returned to the client:

"System.InvalidOperationException: Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are []"

Tags: , , , ,

WCF

Weird Exception Using Spring.NET NMS and ActiveMQ

by jmorris 28. April 2010 15:09

I am doing some testing with Spring.NET NMS and ActiveMQ (via Apache.NMS) and I came across this gem:



Note that the path in exception message does not exist on my local machine?!

Tags: , , ,

Resharper Hides Configuration File Error

by jmorris 21. January 2010 16:14

I just spent a frustrating two hours trying to get a unit test to run via Resharper for nada. The test would start and then exit as if the it was working but instead of showing a green or red icon as expected when the test was finished, it would remain 'grayed' out. I tried the usual: delete bin folders, run solution 'clean' via VS2008, delete the code directory and do a fresh SVN checkout. I even rebooted for nothing: no red, no green all gray:


I finally noticed that I had closed the output window of VS, so I couldn't see the build results. When I opened the output window I saw this exception at the very bottom of the list:

A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in JetBrains.ReSharper.TaskRunnerFramework.dll
The program '[1012] JetBrains.ReSharper.TaskRunner.exe: Managed' has exited with code 0 (0x0).

What the f#*k? A configuration error was causing the Resharper taskRunner to die quietly? You have to be kdding me! Shouldn't the user be alerted if the software could not recover and had terminate? I mean, yeah it _did_ notify me, but not very explcitly - a pop up would have been nice!

Anyways, issue was found: I commented out the starting element of the ConnectionStrings section of the App.Config and when Resharper process tried to load the config it bombed. Crises averted, now back to work.

Tags: , , ,

Jeff Morris

Tag cloud

Month List

Page List