Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Session Variables in IIS

Reply
Thread Tools

Session Variables in IIS

 
 
Brian Brinks
Guest
Posts: n/a
 
      09-22-2005
I am having some trouble with seesion variables.

I have just moved hosting companies to Brinkster.com but have been
having problems with my applications holding session.

They say they can't guarantee sessions and recomend another method of
storing persistant data.

I questioned them on why, only on their servers, my sessions are being
reset as often as they are. They said it must be a coding issue.
However, I have not had trouble before, with same applications on
different or local servers.

So my question is this, what can reset session data? Just a reset of
iis?

 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      09-22-2005
Brian Brinks wrote on 22 sep 2005 in
microsoft.public.inetserver.asp.general:

> I am having some trouble with seesion variables.
>
> I have just moved hosting companies to Brinkster.com but have been
> having problems with my applications holding session.
>
> They say they can't guarantee sessions and recomend another method of
> storing persistant data.
>
> I questioned them on why, only on their servers, my sessions are being
> reset as often as they are. They said it must be a coding issue.
> However, I have not had trouble before, with same applications on
> different or local servers.
>
> So my question is this, what can reset session data? Just a reset of
> iis?
>
>


Please show us the smallest code where this phenomenon happens.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

 
Reply With Quote
 
 
 
 
Brian Brinks
Guest
Posts: n/a
 
      09-22-2005
Here is a code sample - It is basically very simple - just gettin some
data from a db and displaying it in a dropdown:

Function displayCompanies()
dim arrCompanies,i
arrCompanies = DB_ExecuteSQLReturnArray("SELECT * FROM t_company order
by t_company.company")
if ISarray(arrCompanies) = TRUE then
%><div align=center>
<form name="companyidd" method="post"
action="home.asp?action=companydata">
<select name="select"
onchange="window.open(this.options[this.selectedIndex].value,'_top')">
<option>Companies</option>
<option>-----------------------</option>
<%
for i=0 to ubound(arrCompanies,2)
%><option
value="home.asp?action=companydata&cid=<%=arrCompa nies(0,i)%>"><%=arrCompanies(1,i)%></option><%
next
%>
</select><br>
<br>
<!--<input type="submit" name="Submit" value="Submit">-->
</form></div><%
end if
end function

 
Reply With Quote
 
Egbert Nierop \(MVP for IIS\)
Guest
Posts: n/a
 
      09-22-2005

"Brian Brinks" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>I am having some trouble with seesion variables.
>
> I have just moved hosting companies to Brinkster.com but have been
> having problems with my applications holding session.


That's true. If an application is reset or if you are using a web farm you
can't garantuee your session.
Happily, there are good products such as below to solve this.
ISP Session is one of the best compatible with asp and asp.net (version 5.2
is being built to allow even better integration with .NET)

--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm


> They say they can't guarantee sessions and recomend another method of
> storing persistant data.
>
> I questioned them on why, only on their servers, my sessions are being
> reset as often as they are. They said it must be a coding issue.
> However, I have not had trouble before, with same applications on
> different or local servers.
>
> So my question is this, what can reset session data? Just a reset of
> iis?
>


 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      09-22-2005
Brian Brinks wrote on 22 sep 2005 in
microsoft.public.inetserver.asp.general:

> Here is a code sample - It is basically very simple - just gettin some
> data from a db and displaying it in a dropdown:
>
> Function displayCompanies()
> dim arrCompanies,i
> arrCompanies = DB_ExecuteSQLReturnArray("SELECT * FROM t_company
> order
> by t_company.company")
> if ISarray(arrCompanies) = TRUE then
> %><div align=center>
> <form name="companyidd" method="post"
> action="home.asp?action=companydata">
> <select name="select"
> onchange="window.open(this.options[this.selectedIndex].value,'_top')">
> <option>Companies</option>
> <option>-----------------------</option>
> <%
> for i=0 to ubound(arrCompanies,2)
> %><option
> value="home.asp?action=companydata&cid=<%=arrCompa nies(0,i)%>"><%=arrCo
> mpanies(1,i)%></option><%
> next
> %>
> </select><br>
> <br>
> <!--<input type="submit" name="Submit" value="Submit">-->
> </form></div><%
> end if
> end function
>


You are not quoting your question, but I suppose you lost your session
variable?

I do not see a session variable in your code.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

 
Reply With Quote
 
Egbert Nierop \(MVP for IIS\)
Guest
Posts: n/a
 
      09-23-2005
Hi Brian,


Did somebody configure IIS on Win2003 to utilize a web garden? If so, this
is logical. You can't share sessions among a wegb garden without jumping to
external tools since MS does not support sessions for that purpose.

--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm

"Brian Brinks" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>I am having some trouble with seesion variables.
>
> I have just moved hosting companies to Brinkster.com but have been
> having problems with my applications holding session.
>
> They say they can't guarantee sessions and recomend another method of
> storing persistant data.
>
> I questioned them on why, only on their servers, my sessions are being
> reset as often as they are. They said it must be a coding issue.
> However, I have not had trouble before, with same applications on
> different or local servers.
>
> So my question is this, what can reset session data? Just a reset of
> iis?
>


 
Reply With Quote
 
Prabhat
Guest
Posts: n/a
 
      09-23-2005
Hi,

I have one small question on Session. How do I know from which link my
webpage is clicked (like is that from Google ot from with in the same main
page).

I know about Request.ServerVariables("HTTP_REFERER"). So I used this in
"global.asa" file in "Session_OnStart" event like this:

Sub Session_OnStart
Session("ReferralURL") = Request.ServerVariables("HTTP_REFERER")
End Sub

Sub Session_OnEnd
Session("ReferralURL") = ""
End Sub

So that I can use the session variable any where in my website, because the
HTTP_REFERER will give the URL of the last webpage.

But this seems to not working.

Thanks
PN

"Egbert Nierop (MVP for IIS)" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
>
> "Brian Brinks" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
> >I am having some trouble with seesion variables.
> >
> > I have just moved hosting companies to Brinkster.com but have been
> > having problems with my applications holding session.

>
> That's true. If an application is reset or if you are using a web farm you
> can't garantuee your session.
> Happily, there are good products such as below to solve this.
> ISP Session is one of the best compatible with asp and asp.net (version

5.2
> is being built to allow even better integration with .NET)
>
> --
> compatible web farm Session replacement for Asp and Asp.Net
> http://www.nieropwebconsult.nl/asp_session_manager.htm
>
>
> > They say they can't guarantee sessions and recomend another method of
> > storing persistant data.
> >
> > I questioned them on why, only on their servers, my sessions are being
> > reset as often as they are. They said it must be a coding issue.
> > However, I have not had trouble before, with same applications on
> > different or local servers.
> >
> > So my question is this, what can reset session data? Just a reset of
> > iis?
> >

>



 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Put variables into member variables or function variables? tjumail@gmail.com C++ 9 03-23-2008 04:03 PM
Session Timeout problems-web.confg session state and IIS session s =?Utf-8?B?Um9iSEs=?= ASP .Net 4 04-11-2007 04:52 PM
session & application variables not working in Win2003/IIS 6 NewbieDev ASP .Net Web Services 1 04-25-2006 02:47 AM
IIS Session variables / cross-access from PHP <-> ASP.NET Marco Ippolito ASP .Net 2 10-05-2004 03:37 PM
IIS on NT 4.0 is ignoring the session variables in the gloabl.asa Mark P ASP General 1 09-09-2003 07:09 PM



Advertisments