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?
juliandormonAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
RovastarConnect With a Mentor Commented:
Ok you have got some conflict there. Normally you can get away with it.

If you do not use .net at all why don't you disable it in the web services extensions?

That way no .net code can run at all.

If there is any .net code running you will get (I think) a 404.2 error for each page.
0
 
juliandormonAuthor Commented:
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
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
RovastarCommented:
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.
0
 
juliandormonAuthor Commented:
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.
0
 
juliandormonAuthor Commented:
Thanks for your help.
0
All Courses

From novice to tech pro — start learning today.