first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

IIS/PWS 4.0: Starting and stopping the Web Server from the Command Line; CMD Scripts

There are many reasons why the Web Server needs to be stopped and started frequently. Here are two: debugging ActiveX Server Components (after they crash) and manually refreshing the IIS Server cache. I use two CMD scripts, PWSstart and PWSstop. These scripts were tested against PWS but should work with IIS as well:

PWSstart

@ECHO OFF

net start w3svc
net start msftpsvc

PAUSE

PWSstop

@ECHO OFF

net stop iisadmin /y

PAUSE

These scripts may generate error 2185 ("The service name is invalid"). Referring to the following list of Service Names may help resolve this problem:

IIS Admin Service: iisadmin FTP Publishing Service: msftpsvc Microsoft NNTP Service: nntpsvc World Wide Web Publishing Service: w3svc

For more information, please see MS Knowledge Base articles Q236166 ("Using NET STOP and NET START Commands to Force IIS Services to Re-Read the Registry") and Q189409 ("INFO: Controlling the Caching of Web Pages with IIS 4.0"). Debugging ActiveX Components Consumed by a Web Browser; the Debugging Tab; Microsoft Transaction Server (MTS) An ActiveX DLL Project contains an in-process Component looking for a process in which to be. This component ends up being a DLL. Instead of constantly making the DLL every time the code is changed, it is possible to run it on the fly in VB6. Under Project Properties > Debugging, we have the Start Program and Start browser with URL options. (The Debugging Tab, by the way, is only available for ActiveX DLL projects.)

In the case of a browser running a script that calls Classes in the DLL, use the Start browser with URL option to call the script file via a web address. For DLLs built for MTS, this procedure will not work. For MTS you will have to build the DLL each time.

It is possible that the DLL will get "stuck" in a process and not allow the DLL to be created, throwing a "Permission Denied" error message. If this happens, try to shut down the hosting process. In the case of a server-side web server script the web server may have to be shut down. At the very extreme, the system must be rebooted.

For more information please see:

http://www.4guysfromrolla.com/webtech/042499-1.shtml

mod date: 2000-01-30T08:00:22.000Z