Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Global.asa

Reply
Thread Tools

Global.asa

 
 
Evertjan.
Guest
Posts: n/a
 
      09-28-2004
Shahid Juma wrote on 28 sep 2004 in
microsoft.public.inetserver.asp.general:

> I placed my global.asa file into a subfolder in the wwwroot folder. It
> doesn't seem to work when I try to use the sessions that have been
> declared there.
>


It is only read if it is in the root.

Placing it somwhere else is illogical,
as it is only read at the start of the asp application.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

 
Reply With Quote
 
 
 
 
Shahid Juma
Guest
Posts: n/a
 
      09-28-2004
Hi,

I placed my global.asa file into a subfolder in the wwwroot folder. It
doesn't seem to work when I try to use the sessions that have been declared
there.

Any ideas?

Thanks,
Shahid
(remove the words "REMOVETHIS" when replying to email address)


 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-28-2004
In order for that global.asa to be executed, the directory in which it
resides needs to be defined as an application in IIS. If global.asa is in
an ordinary old directory in your site, it will just be an arbitrary file.

Ray at work


"Shahid Juma" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I placed my global.asa file into a subfolder in the wwwroot folder. It
> doesn't seem to work when I try to use the sessions that have been
> declared
> there.
>
> Any ideas?
>
> Thanks,
> Shahid
> (remove the words "REMOVETHIS" when replying to email address)
>
>



 
Reply With Quote
 
Tom Kaminski [MVP]
Guest
Posts: n/a
 
      09-28-2004
"Shahid Juma" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I placed my global.asa file into a subfolder in the wwwroot folder. It
> doesn't seem to work when I try to use the sessions that have been
> declared
> there.
>
> Any ideas?


You need to set that folder as an application through the IIS mmc.

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com


 
Reply With Quote
 
Tom Kaminski [MVP]
Guest
Posts: n/a
 
      09-28-2004
"Evertjan." <(E-Mail Removed)> wrote in message
news:Xns9572AECA983DBeejj99@194.109.133.29...
> Shahid Juma wrote on 28 sep 2004 in
> microsoft.public.inetserver.asp.general:
>
>> I placed my global.asa file into a subfolder in the wwwroot folder. It
>> doesn't seem to work when I try to use the sessions that have been
>> declared there.
>>

>
> It is only read if it is in the root.
>
> Placing it somwhere else is illogical,
> as it is only read at the start of the asp application.


It does not need to be in the IIS server root, but rather the application
root - which can be set anywhere.

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com


 
Reply With Quote
 
Shahid Juma
Guest
Posts: n/a
 
      09-28-2004

"Evertjan." <(E-Mail Removed)> wrote in message
news:Xns9572AECA983DBeejj99@194.109.133.29...
> Shahid Juma wrote on 28 sep 2004 in
> microsoft.public.inetserver.asp.general:
>
> > I placed my global.asa file into a subfolder in the wwwroot folder. It
> > doesn't seem to work when I try to use the sessions that have been
> > declared there.
> >

>
> It is only read if it is in the root.
>
> Placing it somwhere else is illogical,
> as it is only read at the start of the asp application.
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress,
> but let us keep the discussions in the newsgroup)
>


I tried that too and it didn't work. Example, I placed this in the
global.asa file: When I try to use the GetUnixTime or use the
ConnectionString session variable, it responds back by saying that it
doesn't exist.

Shahid

<SCRIPT LANGUAGE=VBScript RUNAT=Server>

Sub Application_OnStart
End Sub

Sub Application_OnEnd
End Sub

Sub Session_OnStart
Session("ConnectionString") = ""
Session("ConnectionTimeout") = 15
Session("CommandTimeout") = 30
End Sub

Sub Session_OnEnd
End Sub
</SCRIPT>

<script language="JScript" runat="server">
function GetUnixTime(strDate) {
if (strDate) {
return new Date(strDate).valueOf();
}
else {
return 0;
}
}
</script>


 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      09-28-2004
You can't have a function like that in global.asa... that is what #includes
are for, not global.asa...

--
http://www.aspfaq.com/
(Reverse address to reply.)




"Shahid Juma" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "Evertjan." <(E-Mail Removed)> wrote in message
> news:Xns9572AECA983DBeejj99@194.109.133.29...
> > Shahid Juma wrote on 28 sep 2004 in
> > microsoft.public.inetserver.asp.general:
> >
> > > I placed my global.asa file into a subfolder in the wwwroot folder. It
> > > doesn't seem to work when I try to use the sessions that have been
> > > declared there.
> > >

> >
> > It is only read if it is in the root.
> >
> > Placing it somwhere else is illogical,
> > as it is only read at the start of the asp application.
> >
> > --
> > Evertjan.
> > The Netherlands.
> > (Please change the x'es to dots in my emailaddress,
> > but let us keep the discussions in the newsgroup)
> >

>
> I tried that too and it didn't work. Example, I placed this in the
> global.asa file: When I try to use the GetUnixTime or use the
> ConnectionString session variable, it responds back by saying that it
> doesn't exist.
>
> Shahid
>
> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
>
> Sub Application_OnStart
> End Sub
>
> Sub Application_OnEnd
> End Sub
>
> Sub Session_OnStart
> Session("ConnectionString") = ""
> Session("ConnectionTimeout") = 15
> Session("CommandTimeout") = 30
> End Sub
>
> Sub Session_OnEnd
> End Sub
> </SCRIPT>
>
> <script language="JScript" runat="server">
> function GetUnixTime(strDate) {
> if (strDate) {
> return new Date(strDate).valueOf();
> }
> else {
> return 0;
> }
> }
> </script>
>
>



 
Reply With Quote
 
Shahid Juma
Guest
Posts: n/a
 
      09-28-2004

"Aaron [SQL Server MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> You can't have a function like that in global.asa... that is what

#includes
> are for, not global.asa...
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "Shahid Juma" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >
> > "Evertjan." <(E-Mail Removed)> wrote in message
> > news:Xns9572AECA983DBeejj99@194.109.133.29...
> > > Shahid Juma wrote on 28 sep 2004 in
> > > microsoft.public.inetserver.asp.general:
> > >
> > > > I placed my global.asa file into a subfolder in the wwwroot folder.

It
> > > > doesn't seem to work when I try to use the sessions that have been
> > > > declared there.
> > > >
> > >
> > > It is only read if it is in the root.
> > >
> > > Placing it somwhere else is illogical,
> > > as it is only read at the start of the asp application.
> > >
> > > --
> > > Evertjan.
> > > The Netherlands.
> > > (Please change the x'es to dots in my emailaddress,
> > > but let us keep the discussions in the newsgroup)
> > >

> >
> > I tried that too and it didn't work. Example, I placed this in the
> > global.asa file: When I try to use the GetUnixTime or use the
> > ConnectionString session variable, it responds back by saying that it
> > doesn't exist.
> >
> > Shahid
> >
> > <SCRIPT LANGUAGE=VBScript RUNAT=Server>
> >
> > Sub Application_OnStart
> > End Sub
> >
> > Sub Application_OnEnd
> > End Sub
> >
> > Sub Session_OnStart
> > Session("ConnectionString") = ""
> > Session("ConnectionTimeout") = 15
> > Session("CommandTimeout") = 30
> > End Sub
> >
> > Sub Session_OnEnd
> > End Sub
> > </SCRIPT>
> >
> > <script language="JScript" runat="server">
> > function GetUnixTime(strDate) {
> > if (strDate) {
> > return new Date(strDate).valueOf();
> > }
> > else {
> > return 0;
> > }
> > }
> > </script>
> >
> >

>
>


Regardless, even when I remove the function, it still doesn't work. Says
session doesn't exist.

Shahid


 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      09-28-2004
> > > </script>
> > >
> > >

> >
> >


Ugh, learn to trim.

> Regardless, even when I remove the function, it still doesn't work. Says
> session doesn't exist.


"WHAT" still doesn't work? "WHAT" says session doesn't exist?

A


 
Reply With Quote
 
Mark Schupp
Guest
Posts: n/a
 
      09-28-2004
Do you have session state enabled for the application directory (IIS
manager, virtual directory properties, virtual directory tab, configuration
button,app options tab)?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Shahid Juma" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "Aaron [SQL Server MVP]" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > You can't have a function like that in global.asa... that is what

> #includes
> > are for, not global.asa...
> >
> > --
> > http://www.aspfaq.com/
> > (Reverse address to reply.)
> >
> >
> >
> >
> > "Shahid Juma" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > >
> > > "Evertjan." <(E-Mail Removed)> wrote in message
> > > news:Xns9572AECA983DBeejj99@194.109.133.29...
> > > > Shahid Juma wrote on 28 sep 2004 in
> > > > microsoft.public.inetserver.asp.general:
> > > >
> > > > > I placed my global.asa file into a subfolder in the wwwroot

folder.
> It
> > > > > doesn't seem to work when I try to use the sessions that have been
> > > > > declared there.
> > > > >
> > > >
> > > > It is only read if it is in the root.
> > > >
> > > > Placing it somwhere else is illogical,
> > > > as it is only read at the start of the asp application.
> > > >
> > > > --
> > > > Evertjan.
> > > > The Netherlands.
> > > > (Please change the x'es to dots in my emailaddress,
> > > > but let us keep the discussions in the newsgroup)
> > > >
> > >
> > > I tried that too and it didn't work. Example, I placed this in the
> > > global.asa file: When I try to use the GetUnixTime or use the
> > > ConnectionString session variable, it responds back by saying that it
> > > doesn't exist.
> > >
> > > Shahid
> > >
> > > <SCRIPT LANGUAGE=VBScript RUNAT=Server>
> > >
> > > Sub Application_OnStart
> > > End Sub
> > >
> > > Sub Application_OnEnd
> > > End Sub
> > >
> > > Sub Session_OnStart
> > > Session("ConnectionString") = ""
> > > Session("ConnectionTimeout") = 15
> > > Session("CommandTimeout") = 30
> > > End Sub
> > >
> > > Sub Session_OnEnd
> > > End Sub
> > > </SCRIPT>
> > >
> > > <script language="JScript" runat="server">
> > > function GetUnixTime(strDate) {
> > > if (strDate) {
> > > return new Date(strDate).valueOf();
> > > }
> > > else {
> > > return 0;
> > > }
> > > }
> > > </script>
> > >
> > >

> >
> >

>
> Regardless, even when I remove the function, it still doesn't work. Says
> session doesn't exist.
>
> Shahid
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments