tags:

views:

665

answers:

2

I have to change some properties in the Default Application Pool of IIS 6.0 using C# and i am constrained to use code using .Net 1.1 Framework. I am restricted to .Net 1.1 coz my code has to be built with a web site that uses .Net 1.1.

Thanks

A: 

Firstly, if this is a tool to configure IIS then is it really dependant on the version of .Net used to run a particular web site?

Secondly, just to make sure you are aware you can run different versions of IIS for each application pool you create, so you can write a web site in .Net 2.0 even if other web sites require .Net 1.1.

Finally, I don't think there is an easy way to do this without using COM Interop. You might be able to configure it using the ADSI/WMI interface. There are quite a few web posts about how to recycle or stop application pools in C#, you'd have to modify one of those to write the correct WMI properties for creating an application pool.

samjudson
On the first question: Ordinarily no, but since my tool should be built on the same machine/settings as the rest of the site, any API's i should should be compatible with .Net 1.1On the second: Yes, i discovered that on my research, but i have to stick on my restriction for the reasons sited above.On the Third: Do you have any webposts that could give a good example...
+1  A: 

I found out that there is actually a commandline tool provided by IIS called adsutil that does the trick. I can shell the command and thru its switches change the properties that i have.