Is it possible to clear this environment variable in code? I want to force the end of an application session, and ensure that the if the user presses the back button in the browser they are forced to log back in.
if instr(lcase(Request.ServerVariables("HTTP_REFERER")), "OrderReceipt.asp") = 0 then Doesn't that line translate to: "if the user did not come from OrderReceipt.asp then..." For some reason it will not work this way.
I am doing a project and I have a form in which I am putting information inside cookies then I am to display the information in the cookies on another page. So when they click submit they goto this page and this is my code:
I am trying to use Request.ServerVariables("SCIPT_NAME") - this is ok normally, but when I try to use the script behind SSL - it does not pick up the full path to where I am - eg:
Request.ServerVariables("SCIPT_NAME") in this file, would show: https://sslrel.com/Default.asp Which makes all my redirects etc - not work! Is this a known feature of SSL, or has it just been setup incorrectly?
Our intranet was running on a Windows NT4 server using IIS4. We have just upgraded to Windows 2000 & IIS 5 but we are now having a few problems. A lot of our code uses Request.ServerVariables("auth_user") to get the users logon name. This used to work fine but now it doesn't work at all. We don't get an error, just a blank value. I have searched around for help but it seems that there is no reason why it shouldn't work, which makes me think that maybe it's not the code that's the problem.
Why does Request.ServerVariables("AUTH_USER") suddenly start returning a 0 length string? I've experience this before...it works fine for a while and suddenly it quits returning values. Other ASP on the same server continues to return valid values. Any ideas what is causing this?
I have a asp page that use the request.ServerVariables("Logon_user"). I'm used fine but then i need to restart the web server. After that request.ServerVariables("Logon_user") has no value, a null string.Why?and How can resolve this problem?
I have had issues with Request.ServerVariables("HTTP_REFERER") because it seems that in many cases it returns an empty string or NULL value. I use it when it works correctly to enable my scripts to be somewhat universal, not requiring hard coded values or "email an associate" scripts etc.
I just noticed that a script I'm working on does work in FireFox but not in IE. I've run the script in XPPro as well as Win2K Server to rule out it being a local setup problem. It seems that if I use Javascript to open an new window FireFox recognizes the referer but IE does not.
I realize this is probably a difference in the way IE handles the Javascript function of opening the window but as it is a Request.ServerVariable that is not being passed maybe someone else in ASP-land has run into it and knows a fix.
i want to know the usage of Request.ServerVariables.I'm not sure this is really a ASP question,so redirects to a more appropriate newsgroup are welcome.
I have a variable that is being passed to me through HTTP headers "Test."I am able to see this variable and its value when I use Request.ServerVariables("ALL_HTTP").
when I iterate through Request.ServerVariables using a "For Each key in Request.ServerVariables" the key of "Test" comes up.However, when I use Request.ServerVariables("Test"), the value returned to me is always empty.
I want to have one of my asp pages ONLY load if someone reached it by my main page. I am new to ASP, but I think I have the theory down, I just need help with the actual commands, syntax, etc... Here is what I got so far, any suggestions?
ref=Request.ServerVariables("HTTP_REFERER") If ref=http://website.com/main_page.htm then goto continue Else goto end
continue() ..... run the code on this page .....
end() Response.Write "You Have Not Reached This Page From Our Main Site"
I have an ASP page which collects the "logon_user" and assigns different permissions based on their "names". It is working properly under Windows 2000/XP, but Windows 9? is NOT recognizing. Could anyone tell me what I have missed? Updating new versions or changing my code?
I have written an application that catches the logon user's name in order to assign different levels of permissions, but the users logon under different OS (Windows versions).
the "logon_user" is recognized under Windows 2000/XP but not Windows9x. The server is under Windows 2000 which connects all kinds of workstations with different OS. Do I need to update the pathes of Windows9x or I need to use different Server variable to catch up the logon user's name?
I am using Request.ServerVariables("HTTP_REFERER") to refer back in some pages but on clint side some pages refered back and some show error page not found. I dont know whats wrong with code.
retstr = Request.ServerVariables("HTTP_REFERER") if instr(1,ucase(retstr),"STEPPAGE") > 0 then returl="wm_steppage.asp?step=2" else returl="wm_mainpage.asp?step=2" end if
i know that HTTP_REFERER will grab the referring page, but here is my question. say someone has clicked a link from google to get to www.site.com/somepage.html, how can i get this url instead of the refering google page?
I am running Server 2003 and ASP. I used the following code to loop through the variable collection:
for each obj in Request.ServerVariables response.write "Object Name: " & obj & "<BR>" & "Object Value: " & Request.ServerVariables(obj) & "<BR><BR>" next
I got the list of all the possible objects as expected, but the majority of the values were blank. I am designing my site so that there is a seemless login capability. When you log into the domain, your credentials are verified through NT. I was going to use one of the available server variables to grab the user name for login purposes, but found all the values blank.
Is there a known bug/issue? Is there a configuration setting in the IIS MMC that I have overlooked that will allow those values to be tracked by the server?
I am coding a login system with login form etc. and when users are denied access to a secure page within the secure area, I want to obviously send them to the login page to check who they are and check they are allowed to view the secure content of the site.
The problem I am having is that currently, if a user is denied access to a secure page, they are sent to the login page. Once they are granted access, they should be sent back to the page they were originally trying to view and not to the main menu.
(The secure area has lots of pages and users would not be happy if they had to trawl through hundreds of pages to try and find what they wanted.
I know I need to use the ServerVariables collection to retrieve the ("URL"), but I dont want to just use this as a querystring parameter when I send a user to the login page.
This would be insecure because someone out there would find my little login script and start using it on their own site by sending users to my login script to login, and then using the querystring parameter to redirect the user back to their own site.
All I want to do is select the part of the URL after the http://www.somedomainname.co.uk/manager/ part. I cannot use a Left select or right select option because my login script will be put onto lots of different websites, and I would have to change the Left select on each different site.
Is it possible with 'classic' ASP to find out the SERVER_SOFTWARE of a remote server. I wish to have a form where people can enter their domain name and then have a page that based on the form post determine what type of hosting the domain is using.
A few days ago all my Request.ServerVariables began coming up empty. I was using Request.ServerVariables("AUTH_USER") for basic authentication but now its useless. Our server administrator tells me he installed some "patches" last week but doesn't think he caused the problem. All I can say is that before the patch they worked fine. Anyone have any ideas on where to look for a solution?
Can I use request.servervariables("HTTP_USER_AGENT") to determine if the user has Firefox or Internet Explorer? Is the return string differentiated enough?
Yet if this button is clicked, they go back to the server and the page is refreshed with original values.
If I click the browser's BACK button (rather than my button above), I go back to the page (from cache I guess) I want (because it contains the user changes). Here I can correct the password without having to rekey the changes.
So, what is the Request.Servervariable needed for the equivalent of the BACK button?
I have a "Email this page to a friend" form that submits to itself and contains the hidden input value="<%= Request.ServerVariables("HTTP_REFERER") %>".
The value="<%= Request.ServerVariables("HTTP_REFERER") %>" is to obtain the URL of the page that the person wishes to send.
The problem is, if someone creates an error in any of the input fields, the page submits to itself again and displays the errors. When this happens, the original HTTP_REFERER url address is lost and now replaced with the url of the "Email this page to a friend" page.
Is there a way to retain the original HTTP_REFERER value even though the user refreshes the page?
From Page1.asp, I use "Server.transfer" to "REDIRECT" to another asp page (page2.asp), in page2.asp I use Request.ServerVariables("URL") and Request.ServerVariables("REFERER") to get the lastpage and the actual page, this method (or property) return incorrect values: "Page1.asp" and ""
Found this funny error on a clients computer the "request.ServerVariables("HTTP_REFERER")" does not show any information on the previous address of the last webpage visited. The computer does how every show the details of "request.ServerVariables("ALL_HTTP")".
I can't seem to be able to duplicate the problem on my computer. Does any one have any ideas why this might be happening?
Request.servervariables("Logon_USer") is working perfectly well for one asp page returning the NT userid as expected but returning an empty string for another asp page.Both the asp pages are in the same directory.This directory have both Anonymous Access and Integrated Authentication enabled att IIS.