I have an MVC 3 application with this route in global.asax
routes.MapRoute(
"ProfilePictureSmall", // Route name
"small/{PictureID}.jpg", // URL with parameters
new { controller = "Picture", action = "Show", Size = "small", PictureID = Guid.Empty } // Parameter defaults
);
And this is the action from my controller
public ActionResult Show(string Size, Guid PictureID)
This route isn't working on my computer but it works on other local computers and test servers and live servers. It used to work on my PC as well, but I recently reinstalled my system so I assume it has something to do with this.
Does anyone have any ideas?
PS: All other routes work fine. This one also works if I remove .jpg
For me, adding this line to web.config inside system.webServer
<modules runAllManagedModulesForAllRequests="true" />
fixed it.
Btw. I'm using .Net MVC 4.0
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With