HOME  |    TRAINING  |   FREE TUTORIALS   |   JOBS
Find out more about our new RSS feed.
FREE Tutorial
BEGINNING E-COMMERCE PART 5 - COMPILING THE FILE

CATEGORY
SEARCH OUR OTHER TUTORIALS

DESCRIPTION

Although we won't talk about registering components and deployment to production servers at this point in time, it is perhaps worth mentioning a useful naming convention associated with versioning. One of the worst gotchas a typical developer goes through when they deploy components to a remote site is when the set of business objects put up there doesn't work as planned and the site is broken. If it's a production site that's being deployed to (and it usually is), the site must be reset to its previous state as quickly as possible.
Click here to be kept informed of our new Tutorials.


This free tutorial is a sample from the book Beginning E-Commerce: with Visual Basic, ASP, SQL Server 7.0 and MTS.


A neat technique that can be used here is, when replacing an existing DLL, rename the DLL installed on the server to a different filename based on the version number. As shown above, use Windows Explorer to get the version number of the existing DLL and rename the file as shown:

Now copy the freshly compiled DLL and register it as normal. If it appears that something is wrong, stop IIS to release the lock on the DLL (stopping Web servers is a topic covered in some detail in Chapter 12), un-register the new DLL, rename the old DLL back to WroxCommerce.dll and register it again. Finally, restart IIS. The system should be back to its original state.

Permissions

Furthermore,Internet Information Server (the Web server that we will be deploying to) is tightly integrated with the Windows NT security subsystem. This means that it's possible to use NT security to control access either to all, or to parts of, any Web site. For most publicly accessible sites, IIS uses a special user account on the domain. When a user accesses the site, the IIS process pretends to be, or more correctly, impersonates this user to determine the access rights to various system resources. This anonymous user is created on installation and typically takes the name IUSR_machinename, so on my computer my anonymous user is called IUSR_BEETLE.

When you try and create an ActiveX component, the permissions set on the actual DLL that contains the components are checked to ensure that the IIS anonymous user has access. If that user doesn't, the file cannot be opened, and you'll see an error like this:

Microsoft VBScript runtime error '800a01ad' 
ActiveX component can't create object 
/site.asp, line 75

The 800a01ad is the key thing to look for here, as this is the error code for a permissions failure. If you're debugging the object from within Visual Basic, you won't usually see this error. The reason for this is the DLL that handles ActiveX object debugging (VB6Debug.dll which can be found in the Visual Basic directory) has no specific permissions set on installation and so by default it is always accessible to all users.

However, if you copy the DLL over to another server, depending on how your security is set up and how you are logged on to the remote server, you may see this error. This will only happen if the new file is installed with permissions that do not include the IIS anonymous user.

To resolve the problem, you just have to:

1. Use Windows Explorer to locate the file.
2. Right-click on the file, select Properties, change to the Security tab, and select Permissions.
3. Click Add...
4. Find the IIS anonymous user in the list, select it, make sure Type of Access: is set to Full Control, and click OK.

Here's what the permissions look like for the WroxCommerce.dll file with my IIS anonymous user in place:




5 RELATED COURSES AVAILABLE
I-NET+ MODULE 13 - E-COMMERCE
On completion of this module, readers will be able to understand e-commerce terms and concepts.....
HTML 4.0 INTRODUCTION
To create, format and publish a small website using HTML 4.0. You will learn to create web pages incorporating fo....
MACROMEDIA DREAMWEAVER MX INTRODUCTION
To give an introduction to the Internet tools and features of Macromedia Dreamweaver MX. Readers will create an a....
MICROSOFT INTERNET EXPLORER 6.0 INTERNET INTRODUCTION
This course provides readers with an introduction to the concept of the Internet and the opportunity to gain a br....
A+ MODULE 5 - THE INTERNET
At the end of this course you will be able to: describe the functions of an operating system, describe the featur....
 
0 RELATED JOBS AVAILABLE
CONTACT US
Thursday 24th July 2008  © COPYRIGHT 2008 - VISUALSOFT