Can I have multiple ASP.Net websites in one solution?

I have a website in which I seem to want to add completely new things every year all the time. Therefore, when I go to www.MySite.com, this is essentially one thing. Therefore, when I have a new idea for what is technically a completely different site, I don’t want to invent and then buy a new domain name and hosting plan. I see on the control panel of hosting companies that I can have several "starting points for the application." I also read a bit about rewriting URLs. Not to mention setting up the virtual path that I found while researching ( The launch of the aspnet website starts in the parent directory )

So my desire would be to possibly have a solution with a lot of projects (Web applications):

MySite MySite Folder One MySite Folder Two MySite Bin ... NewIdea NewIdea Folder One NewIdea Folder Two NewIdea Bin (I suspect each project would of course have its own Bin folder) ... Another Idea Another Idea Folder One Another Idea Folder Two Another Idea Bin ... 

I am fine with users who should go to:

 www.MySite.com www.MySite.com/NewIdea www.MySite.com/AnotherIdea 

To get to each of these "sites", but technically each of them is completely independent and can be changed and published separately as necessary. Each of them has its own web.config, of course.

Is it possible and how can I do it? I think I have all the parts, I just did not and did not try to know this.

+4
source share
3 answers

There is no reason why you cannot create different applications under your website in IIS and then deploy different ASP.NET projects for different applications. Different applications under your site may have different application pools, so you have this degree of isolation.

By default, your users will navigate your various applications through:

  • Mysite
  • MySite / App1
  • MySite / App2

This is probably what you want to do. Just create applications (right-click on your site in IIS and select "Add Application ..."), and then configure as needed.

+4
source

Right-click on the solution, click Install Startup Projects, and click Start Multiple Projects. Change the action for each project to whether you want to start, start with debugging, or not start.

+3
source

Not my topic, but I suggest that this may be useful to you? Reading through them looks pretty similar, and gives you various options with which you can walk and understand each other. Best practice for multiple asp.net web applications

+2
source

All Articles