Step 5 - Setting up the server as a COM object (Optional)

Web Connection supports servers as standalone applications and as COM objects. When running Web Connection under COM you gain slightly better performance and much better administrative control over your servers. COM objects can run without an NT logon, auto start, handle server crashes, support automatic code updates and much more.

Note
COM operation is optional. This is considered an advanced step, but it's provided here for logical continuation of the project building process.

Creating a COM object from your server is rather simple. Follow these steps (using WebDemo as the project name here):

  1. Edit wconnect.h (or your custom app specific .h file) and set DEBUGMODE to .F. to enable all error handling in the framework.

  2. Run the BLD_Webemo.PRG file to rebuild the project. Make sure no errors occur during build.

  3. This should have rebuild your server into an EXE file.
    Note I'm using WebDemo as our sample server as before - you'll have to substitute your own servername in the code snippets below.

  4. Test the server with the following code from the command prompt:
    o=CREATE("WebDemo.WebDemoServer")
    ? o.ProcessHit("query_string=wwMaint~FastHit")
    

    This should generate some HTML output and a hit in the server window.

  5. If this looks good bring up the server's admin page in the browser with:

    http://localhost/webdemo/admin.asp

  6. Start your File Based server from VFP and then click on the Edit Configuration Settings on the Admin page. Scroll the top edit box down to the [Automation Server] section. Make sure that the ProgId name for the server properly reflects your server. It should be: ProjectName.ProjectNameServer. This is done automatically for you by the project Wizard. Return to the Admin page.

  7. Click on the Switch to Automation Messaging link in the top right column.

  8. Go back to the Admin Page and try one of the links. Quick View of Settings is a nice simple one.

  9. You should now see the COM object pop up on the desktop and processing the hit. Your Web page should show the result.

Congratulations - you've just created your Web Connection server COM object for your application.

For more details on what's involved behind the scenes see Manual COM Server Configuration.

See also

Manual COM Server Configuration


  Last Updated: 12/10/1999 | © West Wind Technologies, 2008