How Do You Make Asp Sessions Work If Cookies Are Completely Disabled?
As I understand it IE stores the session id in a cookie on the user machine.
This identifies the session between pages.
If cookies are disabled then session variables don't work...
Is it possible to pass the session id between pages by posting them etc, and
manually force the session id on each page.
View Replies
ADVERTISEMENT
I am using a couple of session variables in my site. From what I can figure
out, session information is stored on the users computer in a cookie -
If the user has cookies disabled, do session variables still work - just
without the option of setting the Timeout property, as I'm assuming?
View Replies
View Related
I am encountering errors with some legacy asp scripts. The erorr returned when accessing these pages is:
Error Type:
(0x80004005)
Unspecified error
and occurrs when cookies are disabled on the client's browser. Note, if cookies are enabled but no cookie exists, the script does not die, it is only when cookies are completely disabled. Code:
View Replies
View Related
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
Code: ....
View Replies
View Related
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....
View Replies
View Related
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.
View Replies
View Related
I created a permanent cookie with this code:
Response.Cookies("chronology").Expires = #January 1, 2038#
Response.Cookies("chronology").Path = "/myDir/"
Response.Cookies("chronology").Secure = FALSE
It seems to work, the cookie is created in the directory "c:Documents and SettingsmyLoginCookies" correctly e in my application it works.
close the browser, I open again my application and everything is like at the ginning.the cookie is still there, but the couples key/value have been deleted, as the cookie was overwritten.How can I avoid this problem?
View Replies
View Related
I have a button that takes me back to my login screen but the user can press back and get back in. I have done some research and looked around and the only way i have found is using sessions-by creating and loosing sessions.
I however use neither and pass my username via a textbox.
Is there a simple way to somehow logout securely without allowing the user to enter the back button?
View Replies
View Related
UserA has a PC running IE 6. This has the cookies disabled:
1 - Override automatic cookie handling: checked
2 - First party cookies: Block
3 - Third-party cookies: Block
4 - Always allow session cookies: Unchecked
The server runs a Classic ASP application running in IIS 5.x that uses the
session cache. These are different machines running within a LAN.
When UserA accesses the website, the ASP code retrieves some data from the
DB and puts it into the session cache and timestamps it (to give it a
time-to-live value).
When UserA accesses the site again, the ASP code checks the value of
Session("DatabaseSettings_DateAccessed") to see if the cache has expired.
Bizarrely, it picks up the correct date set on the previous visit.
I would have expected that, since UserA does not have session cookies
enabled, there should be no existing session identifier available for UserA.
So, how is IIS recognising UserA's session?
View Replies
View Related
Customer wants users to authenticate based on where they came from. They have several locations that the users will be coming from. They don't want anyone to be able to access their website from anywhere other than these locations. The locations ip addresses will be changing regularly. Is there a way to have a page on the INTRANET internally that the users will go to and it will start a session or place a cookie and pass them to the website. The website then looks for that session or cookie and lets them in or denies them based on the session or cookie. The sites that they will be coming from are ASP and .NET servers and it encrypts the URL that it is coming from. The website it is going to is on a PHP server and is built on PHP and MySQL. I have asked this in like every forum on the internet I can find and no one seems to have a solution.
View Replies
View Related
I am having trouble with ASP cookies.
Scenario 1
An ASP page creates a cookie then calls another page. This second ASP page then reads the cookie. This works fine.
Scenario 2
An ASP page calls a second ASP page. First page has a standard HTML form on it which the second page then validates the user input. If the user has made a mistake then page two writes a cookie (user details and error message) and a response.redirect sends us back to the first page. The first page recognises that it was the second page that called it (via a parameter sent as part of the URL) and reads the cookie that it knows page two created. This does NOT work. The cookie is either now not there or the contents are null.
Questions:
How can I tell if the cookie was created or not using IE6? Cookies are enabled and no cookie appears in the Temp Internat Files folder in either scenario.
Also it is possible to see what is in a cookie, apart from using ASP?
Is it not possible to use a cookie in conjunction with a response.redirect (seems unlikely)?
View Replies
View Related
Its strange...I have experimenting with browser hawk by using the cookie sniffer method. However, even If adjust the security slider level in internet options or goto advanced in the privacy tab I cannot seem to prove the condition below....it is almost as if cookies don't want to die in my testing environment.
I did try closing the browser and relaunching but cookies and session ids seem alive and well....is this the usual hassle with testing cookies/sessions?
Option Explicit
Dim bh
set bh = Server.CreateObject("cyScape.browserObj")
bh.SetExtProperties "cookie_both"
bh.GetExtPropertiesEx
if not bh.cookiesEnabled then
response.write "COOKIES DEAD"
end if
View Replies
View Related
Is it possible to send form values from PAGE1 to PAGE2, and then retain the
form info for PAGE3 without using cookies, sessions or DB storage? Also, I
dont want to repost page2 to page3 using hidden form fields.
Just curious! Want to know how to "simply" maintain user form inputs across
a web site even when security and privacy controls are set to MAXIMUM on the
browser. I know using databases would do it, but I would love to find a
simpler solution.
View Replies
View Related
Any body know of a resource that compares/benchmarks the expense (in terms of milli seconds, or server load) of using various programing options?
I know a lot of articles and forum posts reccomend best practices between functions and programming options, but I would be interested in some type of definitive benchmark to decide between various prgramming options, depending on the need.
For example, I can call a Recordset and quickly write it into an array, so that the connection can be closed even before I write the data to the HTML page. This would save conection time and server resources, but I'd like to be able to judge the worth when considering coding it.
Every time I do a Server.Transfer how expensive is it to the server? How much am I loading the server with Session varaibles? If I store some info in a cookie, but have to call it, how long will that take? Am I using up server resources by creating large arrays?
View Replies
View Related
I have created a web site, where the user can login and logout.
when the user logouts, he should not be allowed back into the site until he logins in again. but in my case when the user logouts, and then press the "Back" button of the browser he is back in the site. Can someone please help me with this
Also how can I restrict the same user logining in twice with the same username and password.
View Replies
View Related
I have a dynamically populated page, and for one of the records the page is not completely displayed. When I click view source, the code is complete but about half of the code isn't shown on the page.
View Replies
View Related
In my Session_OnStart in Global.asa, I am setting some cookies. One
of them, I set as follows:
dim UserID
UserID = Request.ServerVariables("LOGON_USER")
Response.Cookies("User")("ID") = UCASE(UserID)
When I immediately log the cookie value retrieved from
Request.Cookies("User")("ID") into the Windows Event Log, I get the
correct value. However, when I try to retrieve the cookie on the home
page of my application using the same code,
Request.Cookies("User")("ID"), it either cannot find the cookie or
cannot read the value. I am retrieving the cookie before all HTML
headers are written. It is my first statement on the page after
Option Explicit. I have even compared the session IDs. The SessionID
created in the Session_OnStart is the same value as the SessionID on
the home page.
I have read that the Session_OnStart only has access to the
Application, Session and Request objects. It does not explicitly say
that it does not have access to the Response object. Also, I was even
able to use Response.Write's in Global.asa to print out the values
although it looked like it had also stopped the session after I did
so. Cookies are definitely enabled on my machine. I have even tried
setting the session cookie's expiration to be persistent for a few
days to see if it was perhaps expiring before I was able to read it
but this did not work either.
Is there something preventing cookies to be created in Global.asa in
the Session_OnStart sub? Is the Response object not available???
Please let me know if anyone else has had this problem or solution.
View Replies
View Related
I have a quick question. I have a form loading up, within this update form I have a few fields disabled: ex: <input type="text" name=record value = "<%=record %> " disabled>.
when I submit this file to asp for updating, it goes to the next page but it does not allow the updates of the disabled fields to come through. How can I get pass that other than using a session variable.
View Replies
View Related
Is it possible for a user to enable permanent cookies but disable session cookies.....this seems like a contradition yet this is what I appear to be
reading in online articles?
View Replies
View Related
I m creating a cookies in my application and it work properly but i can't see the cookies where it will sotred i checked the cookies folder but i didn't find that I want to create a cookies file as the other web site create and store where other cookies will stored in Cookies folder or Temprory Internet files folder eg:1. arvind@google.co[1].txt this stored in cookies folder 2. arvind@msn[2].txt ....
View Replies
View Related
How can i detect cookies are disabled or not.
View Replies
View Related
I found out that I can't get the value of a disabled field with Request("myField"). An alternative could be 'readonly', but my field, that is a listbox <select>, doesn't have this attribute.
View Replies
View Related
The input forms are created using FORMMANGER of MS Visual Interdev 6.0(ASP Code). The forms containing textboxes and bottons (with disable property) are shown correctly in IE5. But when same forms are viewed in IE6 the disabled textboxes and buttons are shown distorted.
View Replies
View Related
i was wondering if i could enable/disable input according to the user, e.g.
enable input2 if input1 is enable, else it's disabled. Also, if input1 is
deleted then input2 is disabled.
View Replies
View Related
I am collecting information from a form. In that one control is calculated by a formula, but i don't want the user to modify it. So i've disabled that button. But my problem is i was not able to get the data using "Request.form("txtcontrol")".
View Replies
View Related
I'm trying (without any success) to get the value of a disabled select
control. From reviewing:
http://www.w3.org/TR/html401/intera...l#adef-disabled
It doesn't sound like it's going to be possible directly. I'm
thinking that I can get around it by enabling the select control
during some javascript that gets executed during the submit.
View Replies
View Related
I currently have a login.asp page which handles Username and Password Authentication. No Javascript functions are on this page. I do have a script that detects if their browser has javascript disabled. Code:
View Replies
View Related
Is there any way I can pass the value in a disabled text field without creating a hidden field?
View Replies
View Related
I am trying to fatch disabled text box vlue on other form but i cant...
View Replies
View Related
I found some example on web, but most of them are need 2 pages by using redirect method. Is there code for do this only in one page?
View Replies
View Related
what's the differences between readonly and disabled attribute? When I do the post, it couldn't get both values <%= fname %>. any ideas?
<input type="text" name="fname" value="Joe" readOnly>
<input type="text" name="fname" value="Joe" disabled>
View Replies
View Related
I have a page (page A) which displays a number of checkboxes, with the checked/not checked value being read in from a database.
Some of these checkboxes must be checked (based on the user currently accessing the page), and therefore are marked as checked="checked" and disabled="disabled" in order to prevent a user from deselecting it.
Page A works perfectly, but I have a problem with the next bit...
When the page is submitted to page B, page B doesn't get sent the values of the checkboxes that are disabled.
Split(Request.Form("KPA" ), "," )
function to put all my selected checkboxes in an array, but the disabled ones that are checked are not appearing in this array.
View Replies
View Related
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.
View Replies
View Related