2

I have no custom routes in my application, only the default one. If i try to open localhost/myapp/controller/action/bla.bla it works fine on my machine (Windows 7 x32, both Cassini and IIS) but fails on the server (2008 R2 x64). Found similar question but the solution doesn't work. Also, found this article where Eilon says it's a special character for MVC and it's "by design". Why there is difference between my machine and the production box and how do i fix it?

Update: the problem site has ExtensionlessUrl-ISAPI-4.0_64bit and ExtensionlessUrl-Integrated-4.0 enabled and mapped to "*.". There are no any managed handlers in web.config. The patch mentioned by Dmitry "is not applicable to your computer", probabaly because it's already installed with SP1. I can confirm that 404 is reported back by ASP.NET MVC, not IIS because i can see the request in Application_PreSendRequestHeaders. Moreover, if i attach a descendant of MvcRouteHandler with overloaded GetHttpHandler() that logs all RouteData it shows that "id" is correctly mapped to "bla.bla". Any ideas?

2
  • Hope you're not accessing by localhost but some proper domain name? Commented Jul 16, 2011 at 19:24
  • On the server, where the problem occurs, i tried both full domain name and localhost - no difference, still getting 404. Commented Jul 18, 2011 at 9:50

6 Answers 6

3
+25

Is the application using any managed handlers that are mapped to the "*." extension? If so, check out this link:

http://support.microsoft.com/kb/980368

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, but it reports "The update is not applicable to your computer". Must be because i have SP1 installed on the server.
2

This work for me:

<system.webServer>
<handlers>
  <add name="UrlRoutingHandler"
     type="System.Web.Routing.UrlRoutingHandler, 
           System.Web, Version=4.0.0.0, 
           Culture=neutral, 
           PublicKeyToken=b03f5f7f11d50a3a"
     path="/Users/*"
     verb="GET"/>
</handlers>
</system.webServer>

Comments

1

Can you find what errors(exceptions) if any are you getting by seeing all first chance exceptions. This will show you how can find all the first chance exceptions your application is throwing.

2 Comments

+1 for interesting link. Tried that. Two exceptions at the problem url: RuntimeBinderException - 'System.Dynamic.DynamicObject' does not contain a definition for 'Title' (not the case) and HttpException - ' Invalid file name for file monitoring: 'C:\a\site\views\Account'. Common reasons ....'.
Interesting, I have just setup my a basic ASP.NEt MVC 3 on my server with same settings but I have found no issue. 173.231.33.56/MySite/Home/Index/blah.blah
1

There is an new update available for Win2k8r2sp1, have a look at

http://www.shanmcarthur.net/Default.aspx?DN=7d0cd525-bbc5-46c3-8096-95f93827aeea

1 Comment

This link just redirects to the blog homepage.
0

Please provide more detail, like what were the expected result, what errors do you get. Which solutions have you tried so far? Have you tried the configuration solution?

<httpRuntime relaxedUrlToFileSystemMapping="true" />

As to, "Why there is a difference between my machine and the production box"... Well my friend, that is a question only you can answer.

1 Comment

Tried that first. More info: targeting .NET 4. Production runs IIS 7.5 ('cause it's 2008 R2) and my workstation IIS 7.0 with slightly different IIS components added (tried to play with that but no luck). If the guy from the article i referred to is correct it should not work at my machine at all. However it does.
0

All the latest Windows updates (after SP1) seem to solve the issue.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.