ASP Sessions not working live

G

Guy Hocking

Hi there,

I am having trouble with an ASP login that uses sessions to control access
to certain pages. However the sessions are not being carried accross upon
using response.redirect.
I realise that this is the case that DNS names and IP addresses vary upon
whether it works or not, however how can i get around using sessions live on
the internet? and make them work>?

Hope you guys can help

Ta

--
Guy

www.bradflack.com

Please remove ANTI and SPAM from my
email address before sending me an email.
 
R

Ray at

Are you response.redirecting to a different domain? What does your redirect
look like?

Ray at work
 
G

Guy Hocking

****
If Not RecordSet.EOF Then
Dim struserLevel, strUName
struserLevel = RecordSet.Fields("UserLevel")
strUName = RecordSet.Fields("UName")
Session("UserLevel") = cint(struserLevel)
Session("UName") = strUName
Response.Redirect("admin3/admin.asp")
****

Not to a different domain at all, in a sub folder of the same website, But
the redirect works, its the session that doesnt get carries accross




--
Guy
www.bradflack.com

Please remove ANTI and SPAM from my
email address before sending me an email.
 
G

Guy Hocking

mmm, it works on my local test server no problem, very strange, dont think
its any of the things listed...

any ideas what i can do about it?

--
Guy

www.bradflack.com

Please remove ANTI and SPAM from my
email address before sending me an email.
 
G

Guy Hocking

im not quite sure what you mean, the page is the application, outside the
directory, and it redirects to a page inside another directory on the same
site

--
Guy

www.bradflack.com

Please remove ANTI and SPAM from my
email address before sending me an email.
 
R

Ray at

Open your IIS manager on the live server.
Go to the site in question.
Right click on this "admin3" directory.
Click Properties

On the directory tab, at the bottom, is an "Application Settings" area.
There is a textbox with a label of "Application Name" to the left. To the
right of that textbox is a command button. That button will either say
Create or Remove. If it says Remove, that means that admin3 is its own
application (with its own sessions, global.asa, etc.).

Ray at work
 
G

Guy Hocking

i dont have access to the live IIS server, as its hosted with another
company, but i have now put the page within the same directory as the page
with the response.redirect, still doesnt work ;-(

--
Guy
www.bradflack.com

Please remove ANTI and SPAM from my
email address before sending me an email.
 
R

Ray at

Guy Hocking said:
i dont have access to the live IIS server, as its hosted with another
company, but i have now put the page within the same directory as the page
with the response.redirect, still doesnt work ;-(

Okay, we'll start over then. How do you know it doesn't work? What does
this do:

<%
If Not RecordSet.EOF Then
Dim struserLevel, strUName
struserLevel = RecordSet.Fields("UserLevel")
strUName = RecordSet.Fields("UName")
Session("UserLevel") = cint(struserLevel)

RESPONSE.WRITE STRUSERLEVEL
RESPONSE.WRITE "<BR>"
RESPONSE.WRITE Session("UserLevel")
RESPONSE.END

Session("UName") = strUName
Response.Redirect("admin3/admin.asp")
%>
 
G

Guy Hocking

Sorry its been so late getting back, long old weekend....

I did what you said and it displays what i want it to fine, on the same
page, but doesnt do the redirect (hence response.end)

Thanks for this

--
Guy

www.bradflack.com

Please remove ANTI and SPAM from my
email address before sending me an email.
 
G

Guy Hocking

However with the redirect in there it doesnt work, so why isnt the session
redirecting?


Thanks again
--
Guy

www.bradflack.com

Please remove ANTI and SPAM from my
email address before sending me an email.
 
R

Ray at

This then takes us back to the original theories, one of which was that that
directory to which you are redirecting is part of a different application in
your IIS settings. If you do not have access to your server, ask your host
to check if it's an application or to remove the application settings of
that directory. If it's a virtual directory, it will be its own
application, by default.

Ray at home
 
G

Guy Hocking

Well it is in a directory of another site, so the root folder is infact not
the root folder.
So basically i need to tell the hosting company that it needs to be its own
application (the directory in which the index.htm page exists, or the
directory that the default.asp page exists?)

Cheers
 
R

Ray at

It's a physical directory in another site that is setup as a virtual
directory in your first site? Chances are it is its own application then,
as when you setup a virtual directory in IIS like this, it defaults it to
being its own application. What you want to have them do is REMOVE the
application settings on this virtual directory. Take a look at your own
local server to see what I mean.

Ray at home
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top