?
Solved

XMLHTTP syntax in global.asa

Posted on 2003-03-25
3
Medium Priority
?
281 Views
Last Modified: 2007-12-19
I am trying to make my application do a XMLHTTP post whenever a new session starts.
My code is basically the following:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
Application("SessionCount") = 0
End Sub

Sub Session_OnStart

Application.Lock
Application("SessionCount") = Application("SessionCount") + 1
Application.Unlock

Application("xmlhttp") = server.CreateObject("Microsoft.XMLHTTP")
...etc

End Sub
 
</SCRIPT>

The above does not work. What went wrong? Thanks in advance
0
Comment
Question by:wallgecko
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
anderson22 earned 300 total points
ID: 8204971
You can't assign objects directly to a session variable.  Use your object like normal and then assign it to the application variable.  When you want to use it in the future, assign a regular variable the value of the application object.

Ex:
'to store the object into the application variable
Set xmlhttp= server.CreateObject("Microsoft.XMLHTTP")
Set Application("xmlhttp") = xmlhttp

'to retrieve the object from the application variable
Set xmlhttp = Session("xmlhttp")

-rca
0

Featured Post

Understanding Linux Permissions

Linux for beginners: How to view the permissions associated with files and directories and also how you can change them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question