473,394 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

problems with Request.UrlReferrer

i have found a problem when using Request.UrlReferrer. if i call the page
using a javascript function, the referrer is null...
i need to call a page and open it on a specific browser size, with no
toolbar, menu, etc. and also need to check that the call comes from a
specific page.
how to make request.UrlReferrer work?

Nov 17 '05 #1
4 4161
"Harley" <harleyobrien%40hotmail.com> wrote in message
news:eO**************@tk2msftngp13.phx.gbl...
i have found a problem when using Request.UrlReferrer. if i call the page
using a javascript function, the referrer is null...
i need to call a page and open it on a specific browser size, with no
toolbar, menu, etc. and also need to check that the call comes from a
specific page.
how to make request.UrlReferrer work?


What makes you think it's broken?

If you want the page to know which page it came from, even when invoked by
your JavaScript function, then send the URL in a query string.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #2
but theres an html header that automatically gives you that... the
Request.Referrer function read the header and exposes its value...
in my case, i need to know the url of the referrer because the system will
only allow calls from specific URLs. if you pass it as a parameter manually,
the security is useless.
everything work ok using standard <A HREF> but a call using javascripts
windows.open gives a blank referrer.
"John Saunders" <jo***********@surfcontrol.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
"Harley" <harleyobrien%40hotmail.com> wrote in message
news:eO**************@tk2msftngp13.phx.gbl...
i have found a problem when using Request.UrlReferrer. if i call the page using a javascript function, the referrer is null...
i need to call a page and open it on a specific browser size, with no
toolbar, menu, etc. and also need to check that the call comes from a
specific page.
how to make request.UrlReferrer work?


What makes you think it's broken?

If you want the page to know which page it came from, even when invoked by
your JavaScript function, then send the URL in a query string.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com

Nov 17 '05 #3
"Harley" <harleyobrien%40hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP09.phx.gbl...
but theres an html header that automatically gives you that...
Yes, but are you sure that this header was supplied? Perhaps it wasn't.
the
Request.Referrer function read the header and exposes its value...
in my case, i need to know the url of the referrer because the system will
only allow calls from specific URLs. if you pass it as a parameter manually, the security is useless.


The security is useless anyway! The header comes from the client as well.
Surely if the client can spoof the querystring, then the client can spoof
the Referrer header.

You should find another security method.

--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #4
sure, youre right the client can spoof with the header... the check is not
supposed to provide a tight security, but an additional annoyance to
unauthorized calls.
i though that window.open ('www.server.com/page.htm') would create a regular
normal http header, including the referrer. am i wrong?

"John Saunders" <jo***********@surfcontrol.com> wrote in message
news:eh**************@TK2MSFTNGP10.phx.gbl...
"Harley" <harleyobrien%40hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP09.phx.gbl...
but theres an html header that automatically gives you that...


Yes, but are you sure that this header was supplied? Perhaps it wasn't.
the
Request.Referrer function read the header and exposes its value...
in my case, i need to know the url of the referrer because the system will only allow calls from specific URLs. if you pass it as a parameter

manually,
the security is useless.


The security is useless anyway! The header comes from the client as well.
Surely if the client can spoof the querystring, then the client can spoof
the Referrer header.

You should find another security method.

--
John Saunders
Internet Engineer
jo***********@surfcontrol.com

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mews.microsoft.com | last post by:
My ASP.NET pages record the referal url for each current page into session. This is then being used by the cancel button to go back to the calling page. Page Navigation is achieved thru'...
6
by: Harley | last post by:
i have found a problem when using Request.UrlReferrer. if i call the page using a javascript function, the referrer is null... i need to call a page and open it on a specific browser size, with no...
8
by: Cathie | last post by:
Hi guys, I want to do a Server.Transfer to get to a second page, so that I may retrieve variables I have set in the first page. I'm doing that with the usual Server.Transfer("pagename", true). ...
3
by: Stephane | last post by:
Hi, I have installed an image on some html page. This image is sent from an asp.net page like this: <img src="image.aspx"> I have a problem with few computers. In my application, I check...
2
by: Jaikanth Sithambaranathan via .NET 247 | last post by:
The problem is in the result page in which i can scroll throughthe contents of the result set 100 at a time. I call the resultpage from a filter page where i accept filter on results to bedisplayed....
6
by: saden_paki | last post by:
I am having this problem, that Request.UrlReferrer comes out to be Nothing, when a user hits a button on a html page which only have this button, on this button's onClick javascript event I have...
2
by: ad | last post by:
I have tree web page A.ASPX, B.ASPX and CheckPW.aspx There is a button in A.ASPX, the click of that button is redirect to B.ASPX .. I write a Page_Load event in b.aspx, if the Session is null...
0
by: Tony | last post by:
I'm trying to capture referrer information. the requests are the first lines of code in the page load sub. Request.UrlReferrer.tostring 'produces the name on of my site not the referrer...
0
AmirGhaffary
by: AmirGhaffary | last post by:
want to insert user Url into data base I work with ASP.NET and i used this code in Session_Start at Global.asax Dim Ref As String If Not Request.UrlReferrer Is Nothing Then ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.