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?

Community
  • 1
  • 1
UserControl
  • 14,766
  • 20
  • 100
  • 187

6 Answers6

3

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

Dmitry S.
  • 8,373
  • 2
  • 39
  • 49
  • Thanks, but it reports "The update is not applicable to your computer". Must be because i have SP1 installed on the server. – UserControl Jul 19 '11 at 06:04
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>
Saykor
  • 707
  • 12
  • 16
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.

user571646
  • 665
  • 5
  • 10
  • +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 ....'. – UserControl Jul 15 '11 at 21:10
  • Interesting, I have just setup my a basic ASP.NEt MVC 3 on my server with same settings but I have found no issue. http://173.231.33.56/MySite/Home/Index/blah.blah – user571646 Jul 16 '11 at 08:10
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

0

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

UserControl
  • 14,766
  • 20
  • 100
  • 187
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.

JohannesH
  • 6,430
  • 5
  • 37
  • 71
  • 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. – UserControl Jun 30 '11 at 12:55