>>If you are developing a web application that uses VFP COM servers, you are familiar with the need to easily release your COM server(s) from IIS' grip before recompiling. Prior to Win2K and IIS 5, it was necessary to run a batch file to stop and restart all of the IIS services when doing this.
>>
>>IIS 5 comes with a new IISRESET utility that can be called with the /RESTART switch that does all of this for you. So in projects that compile a COM server that is used by IIS, you can put a single line in the BeforeBuild method of your project hook:
>>
>>RUN IISRESET /RESTART
>>
>>Keep in mind that on a busy website, it's possible that your object could be reinstanciated by IIS before your project finishes compiling. In this case it is necessary to completely stop the service before compiling, and start it afterwards. Luckily, IISRESET takes to other switches that do this as well:
>>
>>* Stop the web server
>>RUN IISRESET /STOP
>>
>>* Start the web server
>>RUN IISRESET /START
>>
>>These two commands can be placed in the BeforeBuild and AfterBuild methods (respectively) of your project hook class to make sure that you will never see "Access is denied" because of an outstanding IIS reference to your object.
>
>
>Or you can make it easy on yourself...run the component as COM+ application, then just shut it down.
Guess I should post code. :-)
oCOMADmin = CREATEOBJECT("COMAdmin.COMAdminCatalog")
?oCOMAdmin.ShutdownApplication("Eriks COMPlus Application")
Erik Moore
Clientelligence