views:

220

answers:

2

I am kinda new to .NET applications, I have a web forms application that I am working on and I am about to start the development of new pages, I am trying to make the new pages with the ASP.NET MVC, but I am not beeing able to make the pages hit the controllers. First i added the library references added the routes on the global.asax but not sure what else is missing, can someone help me out?

thx.

+4  A: 

Reading between the lines I gather you are trying to add MVC pages to your existing ASP.NET Webforms Webapplication?

If that is the case then you probably need some MVC specific config. settings. Easiest way is to create a new MVC web app and then merge the config settings.

Furthermore if you are doing a hybrid project I'd recommend giving Scott Hanselmann's post on the topic a read.

veggerby
I second this opinion on comparing Web.config ASP.NET MVC settings with the existing ones and considering a careful merge.
Andrei Rinea
+2  A: 

There's a more step-by-step description of adding MVC to a WebForms Application at these links:

You might also want to add the ProjectTypeGuid to the project file with a text editor ({603c0e0b-db56-11dc-be95-000d561079b0} is used to designate to Visual Studio to use the MVC extensions.)

    <ProjectTypeGuids>{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

The links above also don't fully cover the system.webserver area of web.config that needs to be configured.

JoshRivers
Thanks for the links.
infocyde