IIS: multiple web application vs single web application root - iis

We have a legacy system which is build in classic ASP. As we move to asp.net, we find ourselves creating web applications as we migrate old stuff to .net and add new functionalities to the system. I would say maybe 30% of them would share the same library, loading the same dlls. (all applications share the same app pool)
My question would be, what's the pros and cons of this approach?
Would it be better to have one application root?
I am not really looking for a specific answer, just curious what you people do usually and why?
thanks a lot

I would place things that can be logically grouped together into its own app pool.
Example: Components needed for a website or webapp under IIS could be considered a single logical group, therefore it needs its own app pool.
Anything else that is separate should have its own domain with own app pool.
But, IMHO, i think it's a judgment call based on the nature of the app and if it has any dependencies... etc. You know the system better than anybody, so from a 20k foot view of it all, how should things be logically separted?
Example scenario:
If you have an app that needs to be reset via IIS, will it affect others (will others go down due to the one app that requires an IIS reset)? If it's not a big deal, then why not (lump it together with the other). If it is a big deal, then keep it separate so it's not dependent on any externals.

Related

How to affordably release a webapp for my job company

First of all, I'm not really sure if this question goes here in stackoverflow or if I should ask it on another place. Please if that's the case, indicate me in the right way :)
So, for context, this is an app that I was asked to develop for my job. At first I thought in doing a webapp and host it inside the company servers and domain (intranet), but it isn't possible due to external issues that I can't control.
Is there another way to achieve this? The app must have a database and should be accessible for a bunch of users at the same time.
Of course we want to spend the least amount of money possible to make this happen. Also, using a workstation of our own to host everything is not possible either.
Edit: I didn't finish developing, but for now I'm developing it in Python Flask.
The number of users is small really, just up to five people.
OK - I guess a lot of what you'll get in response to this is your definition is too vague. Things such as scale, number of users, programming languages used to create the web app etc are important when talking about hosting.
However, for me, there are three very good options out there for free hosting, up to a certain amount of traffic.
1.) Heroku - Heroku.com
A world known web hosting platform. You can publish code through GitHub, and it has some extensive coverage for different types of web apps. Definitely worth a look.
2.) Netlify - netlify.com
Similar to Heroku, but used by some major companies. Allows you to host for free to a point, and is relatively simple to get started with.
3.) Vercel - vercel.com
A bit more technical in my opinion - but again, very similar to the above two and has a free tier.
All three are great options, and I'd recommend looking into them in more detail to see what option is best for you. Can't go wrong with any of them.
I had a similar problem: A Python-Flask-SQLite app for me and my office pals to use together.
The solution was creating one .exe file with pyinstaller, hosting this and the database files in a network drive (one that everyone that will use the app has access). As everybody (~10 people) sees the same db, things works fine!

how to configure two or more hosts on WAS server

I have the application deployed on WAS. Now i have made few changes on the code and want to deploy on WAS . I want the old deployment to work as it is. But i also want the new changes to be deployed and work separately independent of the other without affecting. How to make both exist simultaneously on WAS.
Is there a way please help
Are you saying there is nothing shared between the applications, they are completely separate?
Have you tried using a different context root and application name?
From a webcontainer perspective, if the context_root is different, it should be treated as a completely different application and should accomplish this.
If it doesn't work after that, the link below discusses various issues you may run into and how to deal with them.
IBM WebSphere Developer Technical Journal: Co-hosting multiple versions of J2EE applications
http://www.ibm.com/developerworks/websphere/techjournal/0405_poddar/0405_poddar.html

Removing a Web Front-End server from Farm (Load Balancing)

I am currently working on a project where we have developed a portal on SharePoint. Currently we have two servers which is using Load Balancing. We're experiencing a lot of difficulties connected to this, so we are thinking about removing one of the Web Front-End servers from the farm.
Could this cause any kind of problems that you can think of? I want to be sure before I recommend to this to our client. Anything you could think of would be great. Also pro's you can think of by doing this is appreciated.
The load balancing was agreed on from the beginning of the project, before we came in as consultants.
(I know this could be posted on SharePoint.Stackexchange aswell, but this could be general knowledge for anyone else as well.)
Since "two servers" is not a good idea anyway (you'd normally create at minimum a three server farm - two load balanced web front-ends and one indexing/job server), you can easily merge them into one server. Steps would be like this:
- enable all the services on the server which stays there
- remove the other server from "web front-end" role
- uninstall sharepoint from the other server
This might require recreation of your shared services provider if you are hosting some of the SSP things on the server you are removing.

What is the Limit of IIS 6.0

What is the limit of IIS 6.0? like for example if i need to host 100,000 or 200,000 websites on IIS 6.0, how many machines would i need? or is IIS7 would be a better choice in this case for some reason?
As mentioned in the comments above the scale isn't so much the number of websites you create in IIS, but how complex and how busy those sites are.
In IIS6 one website does not necessarily equate to one executing process on the server. Application pools can group multiple websites into a single executing process to group and/or isolate applications. Alternately a single app pool can spawn multiple executing processes to make better use of server hardware.
It might help if you were to provide more detail in your question about what exactly you're trying to accomplish. If you're going to be serving hundreds of thousands of sites it would probably be a good idea to partner with a hosting company, or get some assistance from someone who knows the ins and outs of IIS, or another platform in detail and has operational experience with working through large-scale hosting scenarios.
IIS7 is not radically different from IIS6 in any performance-related way; with one exception: you can run ASP.NET in a "native" pipeline mode that bypasses some processing steps. I prefer IIS7 (if I can choose) because of its manageability advantages. But like everyone else said here: the question is impossible to answer without more information.
Hosting that many websites with IIS will be cost-prohibitive in licensing fees. Most large scale web hosting is done on Linux using Apache.

Sharing an HttpRuntime.Cache across two IIS applications

I have two ASP.NET 2.0 applications in IIS; a public booking system and an admin system to manage prices. There is a shared DLL project that accesses the database, used by both applications.
To improve performance, the prices are cached in DLL code to save hitting the database on every request. However, when the administrator changes the prices, the cache is refreshed on the admin application (and obviously it isn't refreshed on the public application)
So, to the question. Is it possible to configure IIS so that these two applications share the HttpRuntime.Cache? If so, how should it be set up?
That would beat the point of having two applications - they should not share the same DLL memory heap, that would be needed. What you need is a communications channel between the two and have the admin web-pages notify about changes to the cache - which would cause a refresh.
May be something simple, but maybe a simple page you post to that causes the cache to check for updates? Or - have the application check for updates now and again based on a time stamp.
(Another option is to create a service where the cache resides, but I think that is outside the scope of a simple solution)
No; by experience this will not work (.NET 4.6, IIS 8.5, 2 applications a common DLL using the same application pool). Documentation is very hard to come by (beyond "cache items are stored in memory") - in fact the only descriptive part was what #Thies stated above - but as he stated I believe this is because the cache is stored in the DLL's allocated memory, therefore (since we still have one process but two app domains) the common DLL is loaded separately into two application domains and the DLL's memory is not shared.

Resources