As a .NET programmer and an avid user of the Global Assembly Cache when dealing with SharePoint one of the things that I have to use most to test my solutions is to recycle the application pool, so that I can put my newly created DLLs and test them.
I use a lot WSPBuilder for this task, but I always wondered : How can I recycle the application pool via command prompt ?
In case you ever wonder the same and still don’t know how to do it, here’s how:
the cscript command is pretty neat. And mostly the Microsoft Platform applications have a .vbs file assigned to them, so give it a try and try some other cool stuff in other apps.
See you later,
By Edge Pereira
Also:
ReplyDeleteappcmd recycle apppool "MySharepointAppPool"
appcmd.exe can be found in the \windows\system32\inetsrv\ directory.
WSPBuilder has built in tools to do that application recycle. Should check out the tools on the @SPDevWIki
ReplyDeletehttp://www.sharepointdevwiki.com/display/public/Other+SharePoint+Development+Tools
Has a link to @harbars application pool recycle tool too!
yes Jeremy, wspb it is indeed a very good tool, but the post was intended to display a 'command line option'.
ReplyDeletemostly the sharepoint people already know the WSPBuilder anyway :)
thanks for the comment and take a look at @superedge
Edge,
ReplyDeleteThank you very much. It has been years since I have written a batch job so that I can schedule a task. We are on IIS 6.0 and your little cscript example made it a breeze, for someone who doesn't have a lot of other tools handy, to create a scheduled IIS Recycle Default Application Pool batch file.
I am glad if found it helpful :)
ReplyDelete