views:

187

answers:

1

Hi,

I have an MVC application which is my marketing website, and two other regular asp.net applications which I'd like to put in subdirectories. Can I have an asp.net application (i.e. the mvc marketing) with sub-applications?

Thanks,

Rob

A: 

Yes! You can. You should define each application as Virtual Directory and mark it as an Application in IIS. This way, you can run ASP.NET Web Forms and MVC applications side by side but in diferrent folders.

Mahdi
Thanks Mahdi ... but my MVC app is in the root (and hence has a web.config etc) and now I need to put another application in what would be a subdirectory of that application i.e.myurl.com/ = MVC marketing sitemyurl.com/admin = appforms admin sitemyurl.com/secure = another webforms appmyurl.com/blog = blogging webforms app
No problem at all! If you define /admin, /secure and /blog as separate Virtual Directories in IIS and also make them "Application Folder" in IIS then you can have separate Web.config files for each project just like you're working on different domain names. Here's my own experience: http://pethouse.ir is a WebForm ASP.NET application and http://pethouse.ir/blog is a ASP.NET MVC application and they work side by side because /blog is defined as a Visrtual Directory in IIS.
Mahdi