Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PWS and Session variables

Status
Not open for further replies.

bigfoot

Programmer
May 4, 1999
1,779
US
I can not seem to get session variables to work on PWS. Any reason why?

I save on page 1, then page 2 they are blank.
 
There is no code.
<%
Session(&quot;WebConn&quot;) = &quot;DSN=WEBServ&quot;
%>
on page 1

I add a link to page 2 and click on it....

<%
response.write Session(&quot;WebConn&quot;)
%>
on page 2

and it comes up blank.
 
i recall something about session variables with PWS not working across folders -- i.e., session variables only work within the same folder... is your &quot;page2&quot; in a subfolder, or are you referencing &quot;page2&quot; aboslutely, i.e, with a leading slash, or fully qualified URL? try searching Microsoft website, they may have more info.

good luck!
 
Just for kicks try:


<%
Response.Write(Session(&quot;WebConn&quot;))
%>
www.vzio.com
ASP WEB DEVELOPMENT



 
Hi Funka, they are both in the same folder.

And snowboardr, I know it's blank because when I go to use it, it crashes the asp page.

Any other test environment I can use besides PWS?
 
what OS are you running.

IIS is a good alternative and much better.

out of curiousity, do you have cookies enabled? if you program often then I know thats a stupid question but it would not work if you didn't .

also you can try
<%
Session(&quot;WebConn&quot;) = &quot;DSN=WEBServ&quot;
Response.Write Session(WebConn&quot;)
'make sure you are even setting the variable
%>

admin@onpntwebdesigns.com
 
Cookies cookies enabled, and I am setting the session var. -thought of that first :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top