Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 2nd, 2007, 06:49 AM
Authorized User
 
Join Date: Jan 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pushpa
Default

Global.asa file is present at wwwroot/inetpub dir.

but still no use.

No any no.of active users .

thank you.


 
Old March 2nd, 2007, 09:09 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

This works as i have tested it. If it doesn't work for you, you have incorrectly configured IIS.

Global.asa
<script language="vbscript" runat="server">
sub Application_OnStart
Application("Users") = 0
end sub
sub Application_OnEnd
'some code
end sub
sub Session_OnStart
Application.Lock
    Application("Users") = CInt(Application("Users")) + 1
Application.Unlock
end sub
sub Session_OnEnd
Application.Lock
Application("Users") = CInt(Application("Users")) - 1
Application.Unlock
end sub
</script>

index.asp
<%@Language="VBScript"%>
<%Option Explicit%>
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>
<%
Response.Write(Application("Users"))
%>

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old March 5th, 2007, 06:45 AM
Authorized User
 
Join Date: Jan 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pushpa
Default

what is the default cofiguration of IIS ,regards to Glogal.asa file


 
Old March 5th, 2007, 07:11 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

What do you mean?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old March 7th, 2007, 06:06 AM
Authorized User
 
Join Date: Jan 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pushpa
Default

How I can understand that IIS is wrongle configured. so cause of that still Glogbal.asa is not outputting the Active user.


 
Old March 7th, 2007, 09:07 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Just check and ensure that the directory that your are pulling your files from is setup as an application and that the asa file is in the root, no further configuration is needed.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old March 9th, 2007, 07:10 AM
Authorized User
 
Join Date: Jan 2007
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to saurabhj Send a message via Yahoo to saurabhj
Default

Check if asa file is there at root directory

 
Old March 9th, 2007, 07:49 AM
Authorized User
 
Join Date: Jan 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pushpa
Default

i have already mention that Global.asa file is present at root dir.

 
Old March 9th, 2007, 08:24 AM
Authorized User
 
Join Date: Jan 2007
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to saurabhj Send a message via Yahoo to saurabhj
Default

This works correctly sometimes but not everytime..

I think you have to use SiteStats method.
It is very useful and working fine everytime

-Saurabh
 
Old March 9th, 2007, 08:30 AM
Authorized User
 
Join Date: Jan 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pushpa
Default

ok i will be try for this one also.







Similar Threads
Thread Thread Starter Forum Replies Last Post
global.asa vin_0x1 Classic ASP Components 2 July 24th, 2006 01:13 AM
Global.asa gmoney060 Classic ASP Basics 3 September 25th, 2004 09:11 AM
GLOBAL.ASA zaeem Classic ASP Databases 3 November 4th, 2003 09:13 AM
Global.asa madsmad ASP.NET 1.0 and 1.1 Basics 1 August 17th, 2003 07:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.