R
Ram
Hey,
Is there a way to remotely Recycle IIS 6.0 Application Pools in .Net?
Thanks ahead
--Ram
Is there a way to remotely Recycle IIS 6.0 Application Pools in .Net?
Thanks ahead
--Ram
Alvin Bruney said:to recycle using script see this
http://groups.google.ca/groups?q=recycle+app+pool&hl=en&lr=&selm=OptknwINDHA
..3664%40tk2msftngp13.phx.gbl&rnum=1
for codebehind see this
void RestartApplicationPool(string applicationPoolName)
{
if (applicationPoolName == null)
{
throw new ArgumentNullException("applicationPoolName");
}
using (DirectoryEntry applicationPool = new
DirectoryEntry("IIS://localhost/W3SVC/AppPools/" + applicationPoolName))
{
applicationPool.Invoke("Recycle");
}
}
--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------
Ram said:Hey,
Is there a way to remotely Recycle IIS 6.0 Application Pools in .Net?
Thanks ahead
--Ram
Alvin Bruney said:to recycle using script see this
http://groups.google.ca/groups?q=recycle+app+pool&hl=en&lr=&selm=OptknwINDHA
..3664%40tk2msftngp13.phx.gbl&rnum=1
for codebehind see this
void RestartApplicationPool(string applicationPoolName)
{
if (applicationPoolName == null)
{
throw new ArgumentNullException("applicationPoolName");
}
using (DirectoryEntry applicationPool = new
DirectoryEntry("IIS://localhost/W3SVC/AppPools/" + applicationPoolName))
{
applicationPool.Invoke("Recycle");
}
}
--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------
Ram said:Hey,
Is there a way to remotely Recycle IIS 6.0 Application Pools in .Net?
Thanks ahead
--Ram