views:

467

answers:

3

I have 2 web application projects. One is my asp.net MVC app and the other is for the admin related functions which is asp.net web forms Dynamic Data. My MVC app would be the main site, but I would want the webforms to work under an Admin folder of the MVC site.

While debugging the application, I would like the "/admin/Default.aspx" link on the MVC site to link to the default page within my Dynamic Data site. How do I accomplish this? I know I can test each project independently.

+1  A: 

The easiest way would be to run them both in separate virtual directories and use Url Rewriting to push requests for the root to the public site. You can nest ASP.NET applications, but that generally requires quite a bit of fussing with the configuration file to dodge inheritance issues.

Wyatt Barnett
+1  A: 

You could achieve this behavior via your IIS-Manager. Click on the Website, navigate to the folder you want to behave like a separate application and use right-mouse click and press "convert-to-application".

Robert
This should work well for the deployment, but what about testing from VS itself running on localhost?
RSolberg
In the IIS manager, set you default site location to the location of your MVC app. Add the application for the admin as above. Run at http://localhost, or set this as the debug location in VS.
ScottE
You could use an configurable links to the admin section and back. In the development environment you adjust your configuration to use an absolute path.Alternativly you could try to remap your URLs via the windows hosts file.
Robert
+4  A: 

Within the visual studio project, you can right click on a folder and select "Convert to Web Application" which resolved my issue.

RSolberg