I've tried everything in the book and what google could find:
- add the references for MVC
- remove all custom modules
- Add the Controller & View Structure
- Add the required entries in the web.config file
- Cross check all handlers and modules against a working MVC application
As long as the classic ASP.NET webpage is doing it's stuff it's all peachy, but as soon as I need to step onto the MVC then it all goes haywire.
Standalone MVC applications work like a charm on the current server config as do ASP.NET applications, but when I try to place some MVC stuff into our web application, all hell breaks loose....
The UrlRoutingModule evaluates a request and checks if it matches a route that is stored in the RouteTable. If the route matches, it overrides the default handler (IHttpHandler) for the request so that the MVC framework handles the request.
That module is present and loaded. Discovered it was missing when crosschecking the modules between our application and the MVC applications.
As for running the site as a standalone application, that's not a viable option due the deployment configuration, but I will check tommorow if it can be done regardless.
Arne De Herd...
Member
1 Points
29 Posts
Re: Virtual Directory
Dec 02, 2010 12:38 PM|LINK
I removed the IHttpModule from the equation for now, but this results in the a standard : the page cannot be displayed....
ignatandrei
All-Star
134511 Points
21576 Posts
Moderator
MVP
Re: Virtual Directory
Dec 02, 2010 01:09 PM|LINK
please make another 2 test:
1.if you put a "hellpo world" asp.net application , does it work?
2.if you put a "hellpo world" asp.net MVC application , does it work?
Arne De Herd...
Member
1 Points
29 Posts
Re: Virtual Directory
Dec 02, 2010 01:16 PM|LINK
both work just fine.
So the problem is something related then to our IHttpModule that's performing rewrites.
Arne De Herd...
Member
1 Points
29 Posts
Re: Virtual Directory
Dec 02, 2010 03:21 PM|LINK
I've tried everything in the book and what google could find:
- add the references for MVC
- remove all custom modules
- Add the Controller & View Structure
- Add the required entries in the web.config file
- Cross check all handlers and modules against a working MVC application
As long as the classic ASP.NET webpage is doing it's stuff it's all peachy, but as soon as I need to step onto the MVC then it all goes haywire.
Standalone MVC applications work like a charm on the current server config as do ASP.NET applications, but when I try to place some MVC stuff into our web application, all hell breaks loose....
sachingusain
Star
8786 Points
1702 Posts
Re: Virtual Directory
Dec 02, 2010 04:12 PM|LINK
Which version of VS.NET and MVC are you using.
If using VS.NET 2008, check your web.config whether it has this entry?
The UrlRoutingModule evaluates a request and checks if it matches a route that is stored in the RouteTable. If the route matches, it overrides the default handler (IHttpHandler) for the request so that the MVC framework handles the request.
From ASP.NET MVC in Action book.
Thanks.
marcind
Contributor
3344 Points
609 Posts
Microsoft
Re: Virtual Directory
Dec 02, 2010 05:34 PM|LINK
Could you try setting it up as an IIS application, not a virtual directory?
ASP.NET Team
@marcind
Blog
Arne De Herd...
Member
1 Points
29 Posts
Re: Virtual Directory
Dec 02, 2010 08:02 PM|LINK
That module is present and loaded. Discovered it was missing when crosschecking the modules between our application and the MVC applications.
As for running the site as a standalone application, that's not a viable option due the deployment configuration, but I will check tommorow if it can be done regardless.
Arne De Herd...
Member
1 Points
29 Posts
Re: Virtual Directory
Dec 03, 2010 07:39 AM|LINK
I tried setting up a Application for the website, but when I navigate to it, all I get is some sort of binary output....
Arne De Herd...
Member
1 Points
29 Posts
Re: Virtual Directory
Dec 03, 2010 08:48 AM|LINK
is it possible the RewriteUrl in our custom HttpModule is breaking the MVC?
Arne De Herd...
Member
1 Points
29 Posts
Re: Virtual Directory
Dec 03, 2010 02:19 PM|LINK
Finnaly after long searching and tinkering I managed to get everything working.
The MvcHttphandler never got invoked due crappy configuration on IIS...