views:

51

answers:

3

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  A: 

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

RedFilter
no, its complied against .net framework version 4.0
Joe
Do we need to have any other framework , 3.5 other than 4.0?
Joe
A: 

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 say.

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...

Darkxes
I dont think that should be an issue with IIS7, if the file doesnt exists, it MVCRouteHandler should be invoked,
Joe
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.
Darkxes
A: 

Try this :

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

Or try to debug routing

Ender
that didnt help
Joe
You put this in the web.config, correct ?
Ender
correct, i put in web.config file
Joe
i removed <validation validateIntegratedModeConfiguration="false" />and it seems to be good now
Joe