Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC - Is it even possible to have multiple MVC projects on the same server?

I'm having so many problems getting more than 1 MVC project up and running on the same server... I'm using a Windows XP system running the default IIS (5.1 I believe).

At this moment I'm even building WebSetup projects for every project I create to make sure everything goes well, while these projects could very easily be deployed using XCopy.

Bottom line, I can get a MVC project (e.g. ContactManager example) running at: http://servername, OR http://servername/ContactManager. But as soon as I have a project at both locations the horror starts

"title is not a member of ViewPage" -> yeah, right...
Section or group name 'system.web.extensions' is already defined. -> sure 
let me <clear /> or <remove /> that one, oh that's not valid... 

Is it even possible to have more than 1 ASP.NET MVC project (application) running on the same Windows XP machine?

http://server/       Root project  (MVC)
http://server/app1   Application 1 (MVC)
http://server/app2   Application 2 (MVC)
http://server/appX   Application X (MVC)

Can somebody name some points of attention or something?

like image 642
Ropstah Avatar asked May 11 '09 11:05

Ropstah


People also ask

Should you split your ASP NET MVC project into multiple projects?

It shouldn't! That's why it's designed in a modular way. In most web applications out there, we version and deploy all these assemblies (Web, BLL and DAL) together. So, separating a project into 3 projects does not add any values.

Can MVC and ASP.NET coexist?

MVC is just a different implementation of the IHttpHandler interface so both classic ASP.NET and ASP.NET MVC pages can coexist in the same app. Show activity on this post. As you've probably noticed with the above answers, yes this is very possible to do.

Is ASP NET MVC still in use?

It is no longer in active development. It is open-source software, apart from the ASP.NET Web Forms component, which is proprietary. ASP.NET Core has since been released, which unified ASP.NET, ASP.NET MVC, ASP.NET Web API, and ASP.NET Web Pages (a platform using only Razor pages).


2 Answers

Is it even possible to have more than 1 ASP.NET MVC project (application), running on the same Windows XP machine?

Yes, it is absolutely possible to have more than 1 ASP.NET MVC application at same Windows XP machine. I've just created two new ASP.NET MVC applications on my test machine running fresh Windows XP SP3 and they works smoothly.

UPDATED:

I've just created 3d application:

  • IIS root path changed to that application
  • Added mapping .* to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll.
  • Checked anonymous access

Still all 3 applications works very well

UPDATED:

There is one issue with mapping .* to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll at the server root: all your not-MVC plain ASP.NET applications will stop working.

Home this helps

like image 83
eu-ge-ne Avatar answered Sep 23 '22 00:09

eu-ge-ne


Yes this is possible. I have 3 MVC applications running under 1 main MVC application.

- Main site
           - Administration
           - Sub App 2
           - ...

However, you need to check the following details.

  1. check the main and sub applications are all setup to use the wildcard mapping for MVC with aspnet_isapi.dll.

  2. due to inheritance of web.configs you need to set a property in your root MVC application... wrap this around your < system.web >

<location path="." inheritInChildApplications="false">
   <system.web>...
</location>
like image 33
David Avatar answered Sep 25 '22 00:09

David