473,386 Members | 1,958 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,386 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 4160
"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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.