“HTTP 404.17 – Not Found” on Win7 for Web Site that was build with .net 3.0 as the target framework

by vivek 5/25/2010 9:11:04 AM

Let me confess, I had to cook this up to give you this example.

It happened to my colleague some days back when he developed a simple WCF application on Windows Server 2003 using VS2003. He selected “Target Framework 3.0” in the Property Page of that Web Site. He then deployed the application on his Win7 machine which has VS2010 with .net 4.0 installed. He fires the Web Site http://localhost/Service.svc and he gets “HTTP 404.17 – Not Found” when running the Web Site under Classic .NET AppPool.

image4 

If you run the Web Site under DefaultAppPool, we will see:

image9

If you see “Things you can try” in the above screenshot, it says “add an explicit MIME map”. But why.

Let’s have a look at “Handler Mappings” in IIS MMC. The entry for .svc does exists.

image5 

I had referred my MSDN blog post and followed the steps to make sure I am good with the configuration.

So what’s going wrong.

I have a habit of taking FREB (Failed Request Tracing) whenever I see such issues. To my surprise IIS is initializing .net 4.0 when we request Service.svc file.

image6 

Checked Application Pools under IIS MMC

image7

Hmm.. now that makes sense. So when you install .net 4.0 on Windows 7/Windows Server 2008, Application Pools will be configured to use .NET Framework 4.0 by default.

But, then why didn’t the Service.svc file run. If we see the Handler Mapping carefully .svc file is mapped to .net 3.0 ServiceModel.

image8

If I change .NET Framework type of the Application Pool (Classic .NET ApplPool in our case) to v2.0. The Web Service page works fine.

To resolve the issue, there is a same old trick

Go to C:\Windows\Microsoft.NET\Framework64\v4.0.30319 and fire aspnet_regiis.exe –i.

Now look at the Handler Mappings and you will see

image10

Fire the Web Site and it will work fine.

Hope this helps,
Vivek Kumbhar


Quote of the day:
Never believe anything until it has been officially denied. - Claud Cockburn


blog comments powered by Disqus

Rahul Soni

Rahul Soni  Twitter

 LinkedIn

 Facebook

 Email me



Vivek Kumbhar

Vivek Kumbhar  Twitter

 LinkedIn

 Facebook

 Email me


Stack Exchange

profile for Vivek at Server Fault, Q&A for system administrators and IT professionals

profile for Rahul Soni at Stack Overflow, Q&A for professional and enthusiast programmers

Calendar

<<  May 2013  >>
MoTuWeThFrSaSu
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

All Items
Sign in

Visit Microsoft's Site

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2013, Rahul Soni

Powered by BlogEngine.NET 1.4.5.0