Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: ASP Objects
Expertise: Beginner
Jul 7, 1999



Application Security Testing: An Integral Part of DevOps

Accessing an Existing Instance of an Object in IIS


I have an app exposing a connector class that returns a reference to a single internal global object. This app runs continuously and I want to display status info in an ASP page. When I run code in ASP to do this, it creates a second instance of the EXE. How do I get IIS to use the existing instance?


After you create the object the first time, you could place it in the Application Object. The next time you want to access it, retrieve it from the Application object.

If Application("MyInstance") is Nothing Then
   Create the Object
   Do what you want with it
   Place it in the Application Object 
   (set Application("MyInstance") = The object)
   Do what you want with it
end if
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date