Click to return to the Essentials home page    
Web Workshop  |  Essentials

Standing Out in the Crowd

Jeff Brown
Rafael M. Muñoz
Microsoft Corporation

July 7, 1997
Updated: December 15, 1998

The following article was originally published in the Site Builder Magazine (now known as MSDN Online Voices) "Web Men Talking" column.

Contents
Global uniqueness - Creating globally unique CLSIDs
Hey, I'm not done yet! - Waiting for Microsoft Agent to finish speaking
Strutting your stuff - Gaining Microsoft Internet certification
Who did you say you are? - Hosting multiple Web sites on one machine
Banging heads - Sending e-mail from server scripts
Who's keeping up? - Tools for DHTML and CDF

It's time to tackle the issue of individuality -- for control CLSIDs, at least. Lessons we learned as children, cliches about snowflakes and zebras, come to mind. Apply that to the cyber-world, and you begin to get the picture. We also look at the Agent control (one of our favorites), Internet certification, updates to Web tools, e-mail (we always have at least one e-mail question), and how to host many, many Web sites on one server.

Global uniqueness

Dear Web Men:

In your desktop component article of June 23, 1997, you say that the CLSID is unique to that control. My question is, if I create a control on my machine in Visual Basic® 5.0, what ensures that my control has a CLSID that exists nowhere else in the world? I can see no way to ensure a unique CLSID without a central clearinghouse of some sort!

Thanks.

Gordon Price

The Web Men reply:

Gordon, Gordon, Gordon, would we ever say something that wasn't true? We might misquote something, but nobody's perfect. This is a great question, though. Your thought is that there must be some kind of central clearinghouse; alas, our office just isn't big enough for all those numbers.

The CLSID is what we refer to as a Globally Unique Identifier, or GUID. The UUIDGEN.EXE, or GUIDGEN.EXE, tool in your development environment generates this 128-bit (16-byte) integer. If we do a little math, we see a number somewhere around 3.40282366938. We are pretty sure that we could have the U.S. national debt paid off before we run out of GUIDs, but don't quote us on that!

Lightning might strike twice, and it sounds as though you're concerned that your 128-bit CLSID might be the same as someone else's. Let's take a look at how the GUID is generated. Created by an algorithm specified in the Open Software Foundation's (OSF) Distributed Computing Environment (DCE) documentation, the GUID is a combination of:

You can see that this number is painstakingly created to ensure its uniqueness. For more information, check your development environment's online help.

Back to topBack to top

Hey, I'm not done yet!

Dear Web Men:

I have a menu of links from an ActiveX menu control. They provide a quick way of jumping to other pages at my site. I also have the new AGENTX control on my main page ... he sits there and doesn’t do much but yawn at the moment, but I have high hopes for him!

As an experiment, I thought I'd get him to comment on links as they were clicked by visitors ... so I set up the menu1_select event not only to jump to my links, but also to get AGENTX to make a comment first ... the problem is that he doesn't get a chance to finish what he's saying before the link is followed, and he vanishes in a puff of smoke!

Here's the code I have:

sub menu1_select(Menu_Item)
    select case(Menu_Item)
        case(1)
            agentx.Speak "Going To About Page"
            top.location.href="about.htm"
        case(2)
            agentx.Speak "Lets visit the software dump!"
            top.location.href="files.htm"
        case(3)
            agentx.Speak "Stats freak eh?"
            top.location.href="sas.htm"
        case(4)
            agentx.Speak "Here are Andys favourite links"
            top.location.href="links.htm"
    end select 
end sub

Any idea how I get him to stay loaded long enough to finish what he's saying?

Thanks in advance.

Andy Knight

The Web Men reply:

Cool use of Microsoft Agent, Andy! But yes, you definitely do want to give Genie the opportunity to speak his piece before bringing up the page. With Beta 1 of Microsoft Agent (which only supported the Genie character), you could synchronize actions with speech by using the Bookmark speech output tag, \Mrk=number\. When used in the Speak method, it fires a Bookmark event. You could put the tag at the end of the string passed to Speak, and set up an event handler for the Bookmark event. Then you would change the page in the Bookmark event handler, not in the event handler for the menu, as in your code.

Beta 3 of Microsoft Agent (yes, Beta 3 is here already!) provides a better way to do this, and tons of new capabilities -- including the ability to synchronize animation and speaking among multiple characters! This is done by using Request objects. When you call the Speak method of the Agent control's Character object, you can assign its return value to a Request object. When the Speak method has finished, it will fire a RequestComplete event. You set up an event handler for the RequestComplete event, and check to see if it is the request you want. If so, change the page.

We have put together a sample that demonstrates some of the new features found in Beta 3. It also introduces Merlin, one of the new pre-built characters.

Note: This sample will automatically download the Beta 3 software to your machine if you don't already have it installed. Before you run the sample, we recommend that you visit the Microsoft Agent site, and follow the instructions to download the Microsoft Agent control, text-to-speech engine, and Merlin character data (the Merlin character data needs to be downloaded to C:\program files\microsoft agent\characters\, so create these directories first). For information on removing the Agent, see How do I remove Microsoft Agent from my system.

This sample also requires Visual Basic Scripting Edition (VBScript) 2.0 to work properly. If you do not have it installed, please download it from the VBScript site Non-MSDN Online link.

View the Merlin Speaks! sample.

We think Microsoft Agent is pretty exciting stuff. Now that you can create your own characters -- and have multiple characters interacting with each other and the user -- you really are limited only by your imagination. Go check it out!

Back to topBack to top

Strutting your stuff

Dear Web Men:

First, let me say I find a lot of your columns very useful. They help me stay one step ahead. :)

Here's my question:

You can get certified training on all manners of Microsoft technologies, but what about the Internet technologies? It would be great to have a certified course that would help explain what all those different servers were, how to use ASP/DHTML/etc., etc. So how about it, anything in the pipeline?

Richard Weeks

The Web Men reply:

Richard, have you ever seen military officers with all those colored ribbons on their chests? Have you ever wondered what all those ribbons meant? When you find out, let us know! One day it will be the same with the Microsoft Certification & Training Non-MSDN Online linktitles -- all those honors to explain.

We've been asked this same question at many a conference, and now we've got a great answer: YES, now there is a course available for those of you interested in an Internet certification. You can become a Microsoft Certified Product Specialist with credentials in Internet systems. For information on the specific requirements, see the Microsoft Certification & Training Non-MSDN Online link site.

With the Internet certification, "you will be qualified to plan security, install and configure server products, manage server resources, extend servers to run CGI scripts or ISAPI scripts, monitor and analyze performance, and troubleshoot problems." There's a mouthful. Good luck in your studies, Richard, and we look forward to your next question, which you can sign with the title "Microsoft Certified Product Specialist: Internet Systems."

Back to topBack to top

Who did you say you are?

Dear Web Men:

I run a Web server on (Windows) NT 4 using IIS for many companies. The problem is, they all want their own domain names.

So far, I've been able to bind 30 domain names to the server using two network cards. 30 down, 70 to go!!! Is there a way I could host the other domain names? HELP !?!

Stefan St-Laurent

The Web Men reply:

With so many names, your machine must have a real identity crisis. Yes, you can definitely host more than 30 domain names (Web sites) on one Internet Information Server (IIS) 3.0  Non-MSDN Online link machine. In fact, there are people who have hosted well over 200 Web sites on one IIS machine.

To set up virtual servers (to host multiple domain names/Web sites), you need to bind multiple IP addresses to the network cards on the machine, as you know. You do this in Control Panel, as the IIS documentation describes.

It sounds as though your main problem may be that you have set up your own Domain Name Service (DNS) server using the DNS server included with Windows NT 4.0 Server  non-MSDN Online link and are running into limitations with it. Several issues with the DNS server have been resolved in Service Packs to Windows NT 4.0. To be thoroughly up to date, get the current Service Pack, which is Service Pack 4  non-MSDN Online link.

You’ll be happy to hear that the next version of IIS makes hosting multiple Web sites on one machine super simple. IIS 4.0 can host multiple Web sites using a single IP address. Several new features, such as per-Web site bandwidth throttling (not as painful as it sounds), give you a lot of control in managing multiple Web sites on one machine. You can take a look at IIS 4.0 Beta 2  non-MSDN Online link, which is available for download on the IIS site.

Back to topBack to top

Banging heads

Dear Web Men:

I've banged my head into a wall long enough with this one; now it's your turn. I have a Visual Basic 4.0 CGI running on an IIS 2.0-based intranet. The CGI program catches data from a form and writes that data to a database, no problem. Now I've been asked to also take that same data and do some formatting and send it out in an e-mail message, and do that using MAPI. Sounds simple, Visual Basic does MAPI. However, the standard approaches don't seem to work, because the CGI program is running under IIS, which is running as an (Windows) NT service. The problem seems to be that I can't access the Exchange profile of the default user for IIS, which has been set up as an (Windows) NT domain user. Any ideas, comments, suggestions, thoughts, or random musing would be greatly appreciated.

Eric Hansen

The Web Men reply:

Ouch, please don’t bang your head on the wall, Eric! It smarts.

The underlying problem you are seeing is documented in Microsoft Knowledge Base article Q129120, MAPI Unable to Run as a Windows NT Service non-MSDN Online link. It is not recommended that you attempt to run MAPI code in the context of a script running on IIS, or any other service running on Windows NT non-MSDN Online link.

However, you have a bunch of alternatives. Your Visual Basic  non-MSDN Online link CGI script can use an ActiveX control or launch a command line application that supports SMTP (Simple Mail Transfer Protocol).

One example of an SMTP control we found on the Web is included in a package that used to be known as the Microsoft Internet Control Pack, but is now provided by NetManage as NEWT Internet ActiveX 6.02 Non-MS link. Another is an Active Server Pages (ASP) mail component sold by Steven Genusa at his ASP Developer’s Site Non-MS link. A variety of others are available, too.

(As a side note, IIS 4.0 will also have a built-in SMTP client, which allows Web applications to send and receive e-mail. Check out IIS 4.0 Beta 2 non-MSDN Online link.)

You need to determine whether it is critical to send the e-mail message at the same time that the script is processing the form. Because you are already recording the information in a database, you can reduce the Web server's processing time by holding off on sending the e-mail. It might make more sense to go back through the database periodically and send mail later in a batch process that runs independent of the Web server.

For tons of other resource information and sample applications that will help you build applications for your company’s intranet, check out the Microsoft Intranet Solutions Center  Non-MSDN Online link.

Back to topBack to top

Who's keeping up?

Dear Web Men:

Is there going to be an add-on for FrontPage 97, so that one can create Dynamic HTML for Internet Explorer 4.0?

Thank You!

Brent McDonald

The Web Men reply:

We have great news for Brent and all you other Webmasters: Several third-party companies have betas available or on their way to help you author Dynamic HTML (DHTML). On June 24, 1997, Microsoft announced  non-MSDN Online link that a number of companies are working on betas that would help ground-breaking Webmasters create DHTML. Other companies announced that they were working on Channel Definition Format (CDF) tools.

As for specific Microsoft products, the press release stated that the next versions of Microsoft FrontPage Non-MSDN Online link and Microsoft Visual InterDev Non-MSDN Online linkwould support these technologies.

To top this off, our bread-and-butter folks here at MSDN Online are working hard to bring you some of those third-party betas. During the next couple weeks, look to the MSDN Online Downloads area for a few of these new tools.

Jeff Brown, when not forcing family and friends to listen to Zydeco and country blues music, provides technical support for the Microsoft MSDN Online with a smile.

Rafael M. Muñoz (the even bigger smile above) is a part-time Adonis, and full-time support engineer for Microsoft Technical Support. He takes it very, very personally every time you flame Microsoft.



Back to topBack to top

Did you find this article useful? Gripes? Compliments? Suggestions for other articles? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.