1

I know this sound confusing.. so I am trying to be as brief as possible.

I have a main web with an ASP.NET 4 classic app pool on a windows server 2008 R2; within this website there is a sub folder that contains all the admin functionality of this site; the main developer decided to convert this sub folder into another ASP.NET 4 classic app pool.

so basically I have the main folder converted to an application and a sub folder also converted into an application.

So far we did not had any issues, however I am not convinced that this solution is an optimal one.

I would like to know your ideas on this.

brillox
  • 363
  • 3
  • 22
  • 2
    _"I am not convinced that this solution is an optimal one."_ - then tell your main developer so. Explain what counter-arguments you have to the current setup and how you would like to see it configured. – CodeCaster Aug 21 '13 at 09:14
  • Are these web sites or web applications? Meaning is there a bin folder? And are they separate solutions in visual studio? – nerdybeardo Aug 21 '13 at 10:52

2 Answers2

1

I would not recommend this approach after experiencing it first hand.

Not long ago I developed some new functionality in a large web application which required adding a new HttpModule and the corresponding web.config entry. A short time after the live release we received a phone call stating an application that we don't maintain and I had no idea of was broken.

The cause was my web.config setting requiring this new HttpModule which the sub-application didn't have, therefore it crashed, troubleshooting and mitigating this issue took time and effort.

The next time I wanted to upgrade our application from .NET 3.5 to .NET 4, and we had to confirm that their app would be OK after we upgraded our application, which again took time and effort.

Long story short, it takes minutes if not seconds to create a new app pool and setup an app, it takes excessive time and effort to coordinate these changes for an architecture that simply isn't necessary or beneficial.

Zeb Rawnsley
  • 2,210
  • 1
  • 21
  • 33
1

There are lots of reasons to separate out applications into their own app pools. For one when you have a separate app pool a new W3WP process is spun up, meaning that in some cases it can give you better performance. The new process will also have it's own allocation of memory, so overwriting cache entries for example will not interfere with cache entries on your main site (this could also be bad). Finally and most importantly if your app pool on admin crashes it will not affect the main app pool for your customers. In a lot of cases the app administrative sections are the most likely to fail since they contain so much functionality (but that's not with all cases).

All those good things above can also have negative effects. For example you may want to force expiration of a cache item from the administrative application to the front end portion of the site, this is now going to be more difficult. Also these applications should be split up now in visual studio as two separate applications otherwise deployment will be quirky (both have to use items in the same bin folder). If it's a subdirectory (as you had mentioned) then you'll need to turn of web.config inheritance otherwise you'll get all sorts of problems. Check out this question on how to do that

Avoid web.config inheritance in child web application using inheritInChildApplications

I personally do think in some cases splitting the app pool for an administrative section can be beneficial but that depends on the application itself, you will have to look at your own application and make that decision.

Community
  • 1
  • 1
nerdybeardo
  • 4,655
  • 23
  • 32