how I could store the referrer id in this URL http://www.widget.co.uk?referrer=1234 into a session cookie. I've been given this code by someone else but my knowledge of ASP is virutally non-existent and they need this feature in the site as soon as possible.
<%dim vntRef
if request.querystring("referrer") <> "" then
vntRef = request.querystring("referrer")
session("svRef") = vntRef
end if
if session("svRef") = "" then
session("svRef") = vntRef
end if
%>
where this code goes and how I reference it(if I need to) that would be fantastic. Basically I wasn't told about this until after the site went live and they're now telling me to get it done quick smart so the quicker the better.
I have a site that I'm trying to migrate to ASP.NET from ASP, and the foremost stumbling block I'm hitting is session state between the ASP and ASP.NET applications. In order to access this information, I'm doing a HttpWebRequest from the ASP.NET side into an .asp page, passing the session name on the get in order to request it from the ASP side and write it back to the response stream, giving ASP.NET access to it. Of course I change sessions each time I make the call from the ASP.NET side.
Soooooo, I'm thinking to myself, "Self, shouldn't you be able to fake out the server by getting the session cookie from the initial usage of the asp, pass that data to the ASP.NET, and use that to send a request back the ASP side under the appropriate session?"
From a real high level, I enter the site via a .asp page. This page in turn calls .aspx page from within a frame ......
I am not asp specialist and i was wondering what to choose - session or a cookie. the idea is to make something like a shop but without the function "remember me" ... more like "in memory" cookies. so apparently i will have to use a session or a "in memory" cookie but which one is better. as to my knowledge the session does not differ dramaticaly from the cookie because it uses because as u know it is based on cookies. however why should i use session instead of cookies if the result will be exact the same i.e. if browser does not support cookies the whole thing won't work out?
How would the server know the user has viewed a new post in a discussion forum? All the posts that started today will display in bold. Once I view the post, and the post will display in regular text?
I'm seeing a problem with IE running on OS-X. When the user logs in to the website (ASP/IIS5), a Session is established properly, but somewhere along the line, a new Session is created and abandoned. At that point, the user must log in again due to the code logic (their Session is "gone" and they're then invalid). The original Session's On_End event never fires (or perhaps it doesn't until the timeout which is 40 minutes).
I am monitoring the Session_OnStart and Session_OnEnd events with debug code.
This problem only exists for this one user and the only difference between her and the other users is that she's running IE on OS-X. IE on OS-9 works fine as does IE on Windows.
First, I like to know if I can specify how long a session variable could expire?
I am having problem with user logged in period when using session variable.
When I logged in and go away from keyboard for like 10mins. By then I have to login again in order to post or any website features that requires login.
I have not yet create a cookie for the user when they are login.
The session_onstart event will fire for every pull BECAUSE no SESSIONID cookie is ever created and the server has to assume that every HTTP REQUEST frame is a new session. The response object is actually just setting a header, of course.
Every redirect is sending a header to the browser equivalent to a "meta refresh" and that once again triggers the session_onstart.
If I start a session on our web app then close all browsers, I expect that the session cookie would be deleted and that the session itself would exist until it expired. I then start a new instance of the browser expecting to get a new session id and a new session, but instead I reconnect to the unexpired session. Does anyone know why the session cookie is persisting despite the closure of all the IE windows?
I'm not exactly hot on asp, but I have managed to create a members area / pages on a site that requires the usual login etc through username and passwords.
The problem that I'm having is that people are being logged out and forced to log back in etc.
Here's the code for the log-in form on the site: ....
I need to set a session cookie with an array(100+) and ad values to the array every time the user choses to ad something (to the array while she/he is navigating the site) and write the content of the array on the page after each addition to the array! So, basically:
1- Set session cookie with array. 2- ad values to the array and write out the whole array after each addition automatically, otherwise just write "no choices" or smth. Can anyone show how to do this codes in ASP briefly?
I'm writing an application to authenticate a user using a challenge response mechanism. The client and server components of the application talk over HTTP.
I would like to use an ASP session object to hold a random number on the server. The code to store the number is written as part of a VB web class.
When I read the http header returned from my server, I can't see the session cookie. Why is this? If I create a normal cookie as part of my web class, it is returned correctly within the header.
I am using HttpQueryInfo the read the header as follows:
I want to know if user disable cookie, will the session still working? Actually I remember we could disable cookie in IE before (not sure what version, but I couldn't see the option anymore. Now I am using IE6.
I am having a problem tracking down what I believe to be a problem with the way cookies are being used on our website application.
When user log onto the application, an in-memory (per-session) cookie is created to hold the session key for the user. This unique key is assigned as part of the business layer logon process, and never changes while the user is logged on. The call to the business component returns this unique key if the logon was successful, and the cookie is set up as follows:
Once a user has completed this logon process, they must then click past an intermediate agreement page before actually having access to the main application. When this intermediate page is submitted, it accesses the cookie, extracts the session identifier and writes the value to a database table.
The code to achieve this looks something like:
strSessionKey = Request.Cookies("SessionKey") Dim objInstance Set objInstance = Server.CreateObject("SomeComponent.SomeClass") objInstance.StoreIdentifier strSessionKey Set objInstance= nothing
The whole process works fine until I try to do the second stage (the intermediate agreement) with two separate IE sessions (there are 2 separate IEXPLORER.EXE entries in task manager) very quickly.
I can go through the whole process fine, and then while leaving the application open, I can start again with a new IE window and complete the process again. In each case the correct identifier is stored in the database for each separate session.
If I get to the second stage of the logon process with 2 separate IE sessions, and submit both agreement pages at the same time (or as close together as I can), then they both write the same unique session identifier to the database, as if they are accessing the same cookie! The session identifier used is the one from the first agreement page I submit. This definitely only happens if I do this at the same time. Wait a few seconds between the submissions and all is well.
Has anyone come across something like this before and can advise on a possible reason?
We are working on an old asp project and we noticed that some users get kicked out of the session right after they log in.
I investigated the issue and I found the cause: 1- The user login successfuly. 2- He gets redirected to the menu screen. that's when I set some cookies to cookie("cookie name").expires = Now. that when the session starts to disapear, once the user tries to access other pages (or even refresh), the ASPSESSIONID cookie disapears.
I did some debugging on the http_cookie collection and looks like the ASPSESSION disapears once I set the cookie expiration, although I set the expiration for cookies unrelated to the ASPSESSIONID.
Here is the tricky thing, it works on 90% of the machines, and it doesn't on other machines, it's also random, so some users who had the problem, are now able to work on the system and the problem disapeard.
Have you guys ever had this problem, or do you know if it is related to IE batches or service packs?
When I use a host file entry to point to the host header of the site that I have created on a Win2k server running IIS5, a cookie is not created to hold the session id. The result is that Session_OnStart is run every time a page is requested.
If I set up a DNS entry on the DNS server it all works fine.
I never noticed this problem before we put in Active Directory so it may have something to do with that.
I have set "allow per session cookies" to promt(under Custom Secrity settings in IE) to see if this is being attempted and it is not. So the browser is not even trying to create the session cookie when using the host file.
I am making a news letter application for my company. The idea is that if the cookie (fictional name Frankie ) don't exist a newsletter is being sent to all subscribers.
I'd like to limit access to an ASP script by checking that they came through the correct path. I believe that I can do this by checking that the scriptname that they came from was myscript.asp
How do I go about doing this though? Are there any problems with relying on Referrer? I heard something about Norton Firewall screwing it up
is it possible to get the url to the refferer to a page as a asp value (vbscript) ? I know the document.write(document.refferer) but don't how to use it in an asp script.
A week or so ago, I needed to find the HTTP_REFERER environment variable to check and see if a user is coming from a certain website:
If Request.ServerVariables("HTTP_REFERER")_ = "http://localhost/mydir/page1.aspx" then response.write "Click on a menu choice" else response.write "check back later end if
I have a page nested in an IFRAME (for example framepage1.aspx or ..asp), and I need to check to see if a user is coming to (not coming from ) a certain page where the framepage1.aspx is (the framepage1.aspx could appear in not only page1.aspx, but page2.aspx , or page3). I'm not sure how to accomplish this given that the HTTP_REFERER checks on address only incoming.
I am running into the same problem. Has a fix been found for this yet? I guess I will just comment out the referrer check until this is addressed. I can't run the risk of turning customers away because the forms don't work.
I have seen a post on how to just receive the domain name when using HTTP-REFERRER. But, I need just the webpage. I have tried modifying the code I saw, to no avail. Can anyone help please?
I think I know what I want to say, but don't know the proper syntax. I want to redirect the user to a new page if the referrer is ANYTHING but one particular page (/index.asp)
Code:
<% If instr(Request.ServerVariables("HTTP_REFERER"), IS NOT EQUAL TO /= "www.sheridan.edu/index.asp") Then Response.Redirect("/index.asp") End If %> .
I've got several pages with links. When the links are clicked, a value is posted to 'processing.asp' which does a database update then needs to redirect back to the page from which the link was clicked. Is it possible to obtain the full URL of the referring page using asp? I need it potentially to be able to redirect back to something as complex as:
products.asp?Category_Id=3&SubCategory_Id=12
If that was the URL of the page from which it was linked.
When I set a cookie in global.asa in the sub session_onstart, even if I have "privacy" in IE 6.X set to "block all cookies" the cookie is still set, and I can get it on other pages.
I can't find an article that addresses this as a specific issue. Why does the browser get the cookie when it is set in the session_onstart event even when I have "block all cookies" set?