0

I'm trying to deploy a MVC application to a news Server, I have .net framework 4 and ASP.net MVC2 installed. My app pool is assigned to .net 4, integrated mode. But for some reason, the routing is not happening properly. I am getting a 404 error on links and not properly routed to the controller. What am i missing here? Is it might be order of installation of .net framework and IIS?

1
  • Do you have web.config in Views folder ? Commented Oct 25, 2010 at 14:50

3 Answers 3

1

Your app is probably compiled against .Net Framework Version 2.0. Change your app pool to 2.0 and see if it helps.

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

Comments

0

Try this :

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>

Or try to debug routing

1 Comment

i removed <validation validateIntegratedModeConfiguration="false" /> and it seems to be good now
0

So, if you got a 404 error that is because the global.asax is not being executed. Check out if the IIS is configured to "Check if the Directory/File exists", cause the IIS is default configured to check first if the request exists on the server ... MVC doesn't use the 'real' path, per se.

Hope it helps ;)

EDIT Try to log something at the time the routing is working ... I mean when the Route inside the global asax is called and check out if the mapping is called...

2 Comments

I dont think that should be an issue with IIS7, if the file doesnt exists, it MVCRouteHandler should be invoked,
If the IIS is checking for the file existance before executing the app it's not gonna work, cause it's not gonna call the application.

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.