i am using following code snippet to restart IIS IIS with c#
But i am not finding ServerManagerDemoGlobals
.I added both dll Microsoft.Web.Management.dll and Microsoft.Web.Administration.dll
,but still not able find it
i am using following code snippet to restart IIS IIS with c#
But i am not finding ServerManagerDemoGlobals
.I added both dll Microsoft.Web.Management.dll and Microsoft.Web.Administration.dll
,but still not able find it
You don't actually need this type. You can delete the
PropertyBag applicationPoolBag = new PropertyBag();
applicationPoolBag[ServerManagerDemoGlobals.ApplicationPoolArray] = applicationPool;
arrayOfApplicationBags.Add(applicationPoolBag);
lines all together and the code will still accomplish the application restart you're trying to achieve.