Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
630 views
in Technique[技术] by (71.8m points)

model view controller - Getting a 404 when using .NET 4 on IIS 6, with or without MVC

I've completed this set up on a fair few IIS 6 boxes, but one is giving me a tough time.

The problem occurs when I add the application extension mapping to:

c:windowsmicrosoft.netframeworkv4.0.21006aspnet_isapi.dll

When this is in place, I get a 404 error on every request.

Even if I remove all files from the application directory apart from a basic test.htm and navigate to that, I still get a 404.

  • I've unchecked the "Verify that file exists"
  • I've set up a .NET 4 application pool and pointed my application to that
  • I've changed the ASP.NET version to 4.0.21006
  • I've checked the IIS log file, and there's nothing useful in there (it only shows the first bunch of requests after each reboot and then stops logging)
  • I've checked the application event log and nothing gets reported
  • I've installed MVC 2

I've copied the set up onto another box, just to be sure, following all the same steps - and it all works!

What else can I look out for??

N.B:

If I set .NET to v2 in IIS, then I can successfully navigate to est.htm

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Go into Web Service Extensions in IIS and set ASP.NET 4.0 to Allowed instead of Prohibited.

Like this:

alt text

BTW: This happened to me in the RTM version of .net 4 as well, so it's not just the betas.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...