Link to home
Start Free TrialLog in
Avatar of juliandormon
juliandormon

asked on

How to loop through web sites in IIS and change the version of .net and change application pool used?

I am getting IIS errors that I have more than one version of .net set.
I have over 3000 websites configured so I need to be able to loop through them all and switch then to a single version of .Net.

I would also like to switch the application pool as well at the same time.

I currently you adsutil for a lot of this stuff, but was hoping for some direction or better yet and example?
Avatar of Rovastar
Rovastar
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of juliandormon
juliandormon

ASKER

Thanks. That's a start. It doesn't answer two of my issues:
1. How to loop through all of my sites in IIS to apply this
2. How to change the Application Pool at the same time
Well you can script it to loop through you sites I do not know what sites you have or what you want to do to them I presume you will have a list of the sites you want to do. Also do you *really* want to do 3000 sites on mass without testing them?? That sounds crazy. Are ALL of the 100% OK to do this huge change?

You have the method to change the site via a script now and base this on what criteria you desire. I presumed you know how to use adsutil and scripting (as you say you use them) as you manage these large farms.

Here are a load of scripts to help you further if you need to do multiple functions.
http://www.iisfaq.com/Default.aspx?tabid=2538

I don't understand what you mean about changing the application pool?

There are no .NET configuration settings for app pools. Inside the app pool it will run the .net 1.1 and 2.0 code or php or whatever the applications/sites run but there is no config for it.

So the app pools you have for all these that currently run a .net 1.1 app it will still run the same if teh app is .net 2.0 or php. There is nothing to change in the app pool.
Sorry some background may help here:
I am getting errors that I have at least 2 different versions of .Net set within the same application pool.
I gather this means that one or more of the websites we host (which are in fact classic ASP and don't even use .Net) have been set differently. I'd like to make sure they are all set to the same thing.

As an aside, I have a memory leak somewhere and looks like one ore more of my sites is/are the problem and I would like to isolate these by grouping similar sites into different application pools so I can narrow down that problem.
ASKER CERTIFIED SOLUTION
Avatar of Rovastar
Rovastar
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your help.