Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tip of the day: IISRESET in IIS 5.0
Message
From
03/04/2000 16:02:05
 
 
To
03/04/2000 15:56:22
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00354512
Message ID:
00354530
Views:
21
>>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.

Which requires starting your component services, drilling down to your COM+ application, stopping the app, toggling to VFP, and recompiling your server. Which sounds easier to you? Also, there is nothing to prevent your server from being restarted by a page hit before you get a chance to recompile.

FWIW, you can also shut down a COM+ application from VFP using the COM+ Admin objects- this could also be done automatically from a project hook.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform