I want o develop a console application to get IIS application pool status as of check the status of IIS Application Pool.
I got the similar code and in the DirectoryEntry class,when i add the given line of code I get errors.(I added only the below line in that class)
appPools = new DirectoryEntry("IIS://" + ServerName + "/W3SVC/AppPools", UName, Pwd).Children;
Can someone please let me know what are the packages that I should include and what should i include more to get rid of the errors.
errors I get in the DirectoryEntry class-:
name 'appPools' does not exist in the current context.
name 'Children' does not exist in the current context.
the type or namespace name 'Pwd' could not be found(are u missing a using directory or an assembly reference)
the type or namespace name 'ServerName' could not be found(are u missing a using directory or an assembly reference)
the type or namespace name 'UName' could not be found(are u missing a using directory or an assembly reference)
the modifier 'new' is not valid for this item
identifier expected
can somone please help me as I am new to c#.
Thankyou.