wc Home Test Com In Three Minutes With Ten Seconds Downtime (Updated: 2002.03.09 09:26:30 AM)
Edit -Find - New Topic - Recent Changes - Alphabetic Topic List - Random Topics - List Categories - Home
Making waves on the Web with Visual Foxpro   
Search:

Don't be intimidated by COM. Here's a way you can try it quickly on your server in almost no time, and with essentially zero downtime, with a simple revert procedure if things don't work.

Assumes: Your app is running properly on the server in file-based mode.
  1. Leave your file-based application running throughout! It will continue to service hits while you are working.
  2. Open a Command Prompt and navigate to the folder where your app resides. Let's say your app is called MyWC?.EXE. Register your COM server by typing the command: "MyWC? /regserver". (You should get the command prompt back quickly with no error message.)
  3. In the Start|Run? box, enter DCOMCNFG. Find your application in the Listbox. (It will have a name like MyWC?.MyWwServer.) Select the application and open its Properties dialog.
  4. In the Identity tab, select The Interactive User and click Apply.
  5. In the Security tab, open the Access Permissions and ensure that the IUSR_ account is included. (Also ensure Administrators and any other network authenticated users have access. As with any Windows administration, you should prefer using Groups for this over selecting individual users.)
  6. Do the same for Launch Permissions.
  7. Click OK twice and close DCOMCNFG.
  8. Fire up your browser and navigate to the Admin page (admin.asp) for your application. Click on "Show Manage DLL Status". (Alternatively enter "/wc.dll?_maintain~showstatus".) This will bring up a page that is rendered by WC.DLL directly.
  9. Next to the label "Messaging Mechanism" click "COM Mode". Your app should now be running in COM mode.
  10. Try the effect of clicking "Load Servers" and see if a new visible instance of the WW server window fires.
  11. In your browser (possibly in a separate browser window), try hitting your application and see if you get a response. If so, verify that the response was serviced by the COM instance. (Remember your file-based instance is still running--it just won't be doing anything.)
  12. To switch back to file-based messaging, return to the "Show Manage DLL Status" page and click on "File Mode".
Until Step 9 your app continued to service hits in file-based mode. For the briefest time, in steps 9-11, you switched to COM. If this worked, great! If not, Step 12 switched you back within seconds. You can make this possible "outage" even briefer by having 2 browser windows open in advance. It might be advantageous to use two different browser products for this, ensuring that one is not authenticated, thus simulating an anonymous user when you hit your app, while the other browser is authenticated and able to hit the admin links.
Note that when you later switch to COM permanently you may do things a bit differently. For example, you may choose a specific user in the Identity tab. But that's no big deal. The big deal was believeing COM is easy and workable.

Contributors: Randy Pearson

Edit -Find - New Topic - Recent Changes - Alphabetic Topic List - Random Topics - List Categories - Home
Making waves on the Web with Visual Foxpro   
http://www.west-wind.com/ - 2010.07.29 09:47:26 AM EST
Search: