I've got two different sets of ASP scripts on my server. Each set is kept in their own directory. Both sets of scripts use sessions. I want to make sure that the sessions are not accidentially shared between the two sets as they are both different applications.
Right now I'm having a problem when I do a Session.Abandon from one set of scripts it also kills the session for the other set of scripts (I believe they are both using the exact same session). Is there some way I can make sure this doesn't happen?
We are planning to set-up a load balanced web environment. Accordingly, we are going to change the session management on our website from the classic ASP Session State and session variables, to a database method.
Does any one have any pointers as to how I might approach this, so that I can have the same sort of functionality the ASP sessions give without having to create database columns for each session variable I wish to create. I am thinking along the lines of some serialised dictionary or something that I can stick in a blob column.
I was wanting to know if you could have a function within a session?Example: Code:
<% Session("Message") = MyFunction() %>
Is that possible? Ok, maybe not "is it possible" but can you use the session message to dictate where the function outputs its data? Here's why I'm asking. I have an online testing app that when a person selects the wrong answer the correct answer (along with a bunch of other stuff) will be displayed on the page. I'm getting it to display the correct answer and the other information, but the correct answer is at the top of the page screwing up my layout and the other information is doing what it should.
I am using ServerXmlHttp in a client-side component to basically talk back to the Server within a webpage. I would like to be able to cache some information on the server so that when I callback, I do not have to reconstitue everything that I did for the intial request. However, the Sessions are different.
Is there a way to get the ServerXmlHttp session to impersonate the IE client session? Code:
can any one tell me how to use sessions in asp for 2different users please?Is it straight forward? Never used them before, a friend said it is worth doing
I've just created a simple form that writes information to an Access database using ASP. Everything works fine. My question is, would there be any reason to use the session object other than for tracking purposes.
Specifically, does a session have any inportance on multiple users accessing pages and submitting the form inforamtion to the database. I was curious about errors to the database with multiple users submitting at the same time to the database. This is a small scale application and not expected to have large number of hits. As stated I'm new to using ASP and just wanted to get some input.
I have used SESSIONS on mission critical pages on my site, and if sessions are not enabled / supoorted - these pages will fail. When and why would a session fail? They do not store any info client side,and rely on the server to store session objects in memory, am I correct? Would security settings or privacy controls ever stop sessions working? Which "popular" browsers dont support sessions?
I don't know how to do anything with session and I don't need anything complicated at all. All i need it to do is like create a session when they login sucessfully. And like I want to add on every page if they don't have a session id and the correct access priveleges or watever to redirect them to the login page.how would i do that?
I've had a look around the site but can't find exactly what i'm looking for.I'm writing a small ticket booking engine in asp and am wondering about sessions.Do I need them ? and what is involved in adding them to my code?
a user logs into a website (im using acess for the database, asp for the pages), they are then in a members only area. They should have the ability to view their own personal details and change them if they wish. this should be updated in the database.
the problem is im not sure how to go about it. i seen sessions mentioned in tutorials but im still ,well, lost basically.
I have a database add/view/edit/delete page, and you can only get to it by logging in at login.htm (where it checks username & pw and redirects you to the a/v/e/d page.) But if you know the 'Control Panel' address.
you can just type it in and get full access. I figured I must have to check everytime to make sure they logged in. what would be the best way to do this?
I had a contact form set up using CDONTS.NewMail and it worked fine for about two years. I just went in and changed the object to CDO.Message, and adjusted a few of the properties, and while the e-mailing portion of the code still works, none of the session variables on the page work any longer.
I had both the form validation and the message on the "thank you" page set using sessions from the page with the CDO code, but for some reason using CDO cancels the sessions so that Thank You page is blank and the form validation no longer announces which fields need to be completed.
I am working with sessions to check if the user is logged in. This usually works fine and all my .asp-pages checks if: <% session.Contents("loggedIn")=True %>
But this only works on my web-hotel When I run the same pages on my localhost, it can't find any sessions and I appear to not be logged In.
I have tried to set my localhost on the "trusted sites" list and "always allow" in "override cookie handling" in my Explorer.
Using Session("variableName") to store data for the duration of a session. And using Response.Cookie("nameOfCookie") to store data as a "cookie" in ASP.....some questions here....
Session Variables. There's no disabling that CLIENT-SIDE is there? ASP Sessions are managed by the server, so as long as it's running fine, there's nothing the client can do to stop session variables from being created right?
"Session" Cookies? When using Response.Cookie, is that data actually written to the client's HDD like Javascript cookies would be? I noticed in MSIE 6 you can goto TOOL > INTERNET OPTIONS > PRIVACY > ADVANCED and Overide Session Cookie settings, but they don't seem to work.
I UNCHCKED to ALWAYS ALLOW SESSION COOKIES, and then did a
i'm creating a shopping cart and i need to know when users add products to their shopping cart, does it load a session for each visitor, which when a new customer tries to add it opens a session for him and he closes the site the session closes enabling another visitor to start with an empty basket ?
or does it use cookies instead of sessions ?
my shopping cart does not work properly... i need to fix it in this way, when a new visitor tries to add products to the shopping cart it doesn't display the previous products of the previous visitor.
noting that i'm not using any registration as yet......
how can i fix that?
i have a file called shop.asp which list the type of products available in the database and then when a type is clicked a list of products under this type will be displayed, then customers can add to the cart whatever they want.....
but this does not work properly because if another user tries to access the cart he'll see the previous products in there....
I want to do something very simpel. Make a part of my website available only for users with a username and password. The site is mainly ASP based. The webserver is an IIS6 and I do NOT have access to server settings (session timeout, security,...).
I use sessions to set the validation for the users. Basically you are redirected to a form where you can give a username and password, this is validated with the values in a database. If the password and username are ok a session value is set <%=Session("Validated")=True%>*.
At the beginning of each secured page I start with: <%If Session("Validated")=False Then Response.Redirect("Login.asp") End If%>
So if the session value "validated" is true you can see the secured pages, else you are redirected to the logon page.
The default timeout value for session is 20 minutes. Because the session should stay alive during the complete time of the visit I was thinking of puting the session.timeout to 60 minutes. I set this at the beginning of every secure page: <%Session.timeout=60%>
Now, Users keep on contacting me saying that they have to relogon quiet often. This also seems to happen when a user is not on the website for 20 minutes already (session expired). I tested it myself and have the feeling the I am indeed regularly redirected. Sometimes after 10 minutes, other times 30 minutes, ... There seems not to be any logic in the time that users are redirected to the logon page.
Because the website is used to fill in a lot of long HTML forms, it is very frustrating for the users when they are completing a form and then pressing "Submit" being redirected to the logon page and lose all entered data.
Is there somebody who can give me more info on the strange session behavior? For me it is not normal that a session times out in that unlogic way.
The only solution I can think of is passing the post information to the logon page and then redirect after validation back to the transaction page.
How can you reset the timeout counter on a session in ASP? What I was thinking was that I am doing it maybe wrong?
Now the session variable that let a user have access to the site is set once at logon time: (<%=Session("Validated")=True%*>*). Then it is checked on every page that the user opens (<%If Session("Validated")=False Then Response.Redirect("Login.asp") End If%>)
Would it be a good idea to re-set the variable every time a user accesses page? Like <%If Session("Validated")=False Then Response.Redirect("Login.asp") Else Session("Validated")=True End If%> Would this reset the timer that times out the session? Or do I have to add something like <%Session.Abandon%> before setting the variable again?
What would this do on the server performance? Is this a good way of working with sessions?
Swicth to cookies i.o. sessions?
I am open for all suggestions, please help! In the future there are also money transactions going over this website, so it has to be a secure method! I will use a seperate HTTPS host for this.
i am currently trying to store the username and userID as sessions so that they can be called but I'm going round in circles and can't work it out!! Code:
I've got two sites, on the same server, with the same pages (ones for test, ones live) the only dif that I can find is the global.asa has different db strings.
The sites (that I didn't write) are using javascript (not jscript, javascript) as their ASP serverside language.
The sites login, set some session values, then redirect to a .htm that builds a frameset and loads some pages. This redirect is losing all the set session values on only ONE of the sites. Any ideas where to start?
how to do session tracking with using standard sessions. I have been reading that they are a security hazard. I built my own small business Invoicing system recently [http://weblog.creightonbrown.geek.nz/index.php?cat=28 | currently at www.invoicesystem.digitalbuilder.co.nz] but i am thinking i want to move away from standard sessions to something more advanced. Does anyone have sample code/DB? i have looked at about 20-30 web sites so far but i couldnt find any that implemented session tracking degeneration after say 20 minutes or a setable time. I tried building my own but it didnt seem to like me doing selects where datetime =Now()
I am hosing website using ASP on windows2003 standard server in IIS 6.0 sessions are getting expired immediately. Could any one help me in managing sessions in iis 6.0 and ASP?