Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Webclass Start not operating correctly

Status
Not open for further replies.

dg043

Programmer
Apr 22, 2002
52
0
0
GB
I have a Windows 2000 Server on which I am running IIS v5.1. I have created a WebClass project using Visual Basic 6.0 and can run this project without any problem through this development environment. My problem occurs when I deploy this project to run using IIS only. The project contains an object defined as global within one of the project's modules. This object is initialised in the WebClass_Start method (i.e Set object = New object type) and then called on the first page of the project. When it is called, the program returns error 91: Object variable or With block variable not set. However, if I refresh the page (effectively calling the function again) everything works fine.
My concern is that this means evry time the WebClass has to start, the user will get an error. Granted it can be overcome by refreshing the page but I would still like to know why this is. I've tried deploying the project to several different computers, all with the same result, so it has to be something to do with the code. Any ideas??

Dan Griffiths
Software Analyst
National Grid plc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top