473,657 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request.UrlRefe rrer with IIS redirection ???

I created two iss folder under my aspx project and I redirected each
one of them to same aspx page by IIS that is test.aspx. on the page
load of test.aspx I have to catch where the request come in! (what is
the previous link or reqest)
I try to use Httpcontex.Curr ent.Request.Url Referrer.Absolu teUri but
it returns null

how can I solve this problem?
any ideas ???
-myaspxProject
-x folder * Redirect to myaspxProject/test.aspx *
-y folder * Redirect to myaspxProject/test.aspx *
-test.aspx
Nov 18 '05 #1
3 3348
pmb
Try using Page.Request.Ur lReferrer property instead.

On 10 Jun 2004 05:11:29 -0700, oz*********@yah oo.com (Oney) wrote:
I created two iss folder under my aspx project and I redirected each
one of them to same aspx page by IIS that is test.aspx. on the page
load of test.aspx I have to catch where the request come in! (what is
the previous link or reqest)
I try to use Httpcontex.Curr ent.Request.Url Referrer.Absolu teUri but
it returns null

how can I solve this problem?
any ideas ???
-myaspxProject
-x folder * Redirect to myaspxProject/test.aspx *
-y folder * Redirect to myaspxProject/test.aspx *
-test.aspx


Nov 18 '05 #2
this is a bad approach as some proxies/firewalls strip the refer header from
all requests.

-- bruce (sqlwork.com)
"Oney" <oz*********@ya hoo.com> wrote in message
news:cc******** *************** **@posting.goog le.com...
I created two iss folder under my aspx project and I redirected each
one of them to same aspx page by IIS that is test.aspx. on the page
load of test.aspx I have to catch where the request come in! (what is
the previous link or reqest)
I try to use Httpcontex.Curr ent.Request.Url Referrer.Absolu teUri but
it returns null

how can I solve this problem?
any ideas ???
-myaspxProject
-x folder * Redirect to myaspxProject/test.aspx *
-y folder * Redirect to myaspxProject/test.aspx *
-test.aspx

Nov 18 '05 #3
Just an uneducated guess, but is it possible that the referrer is coming
back as null because IIS is redirecting them from those directories, as
opposed to maybe a default page within those folders performing a
Response.Redire ct or something? Just a thought, probably wrong. ;)

-John

"Oney" <oz*********@ya hoo.com> wrote in message
news:cc******** *************** **@posting.goog le.com...
I created two iss folder under my aspx project and I redirected each
one of them to same aspx page by IIS that is test.aspx. on the page
load of test.aspx I have to catch where the request come in! (what is
the previous link or reqest)
I try to use Httpcontex.Curr ent.Request.Url Referrer.Absolu teUri but
it returns null

how can I solve this problem?
any ideas ???
-myaspxProject
-x folder * Redirect to myaspxProject/test.aspx *
-y folder * Redirect to myaspxProject/test.aspx *
-test.aspx

Nov 18 '05 #4

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

Similar topics

1
3185
by: | last post by:
I've got \\root\folder\Page2.aspx that I want to controll access to, by establishing a rule that says "previous URL must be '\\root\folder\Page1.aspx' (which did password validation). The code snippet below does 1) allow valid Page_Load if referring URL was 'Page1', and 2) disallows Page_Load if the *initial* access attempt was PRIOR to any valid load of 'Page2'... <code> // In Page_Load... // check the prior URL and make sure our...
7
28549
by: Ivan Demkovitch | last post by:
Hi! Here is what I'm doing: I have Login.aspx with code to do forms authentification and I have this line at the end: Response.Redirect(Request.UrlReferrer.ToString()); I have other (non-ASP.NET) pages that post to Login.aspx. THis way I accomplish asp.net authentification.
7
10751
by: Aaron Prohaska | last post by:
Has anyone had any experience with Nortan Antivirus causing problems when trying to use Request.UrlReferrer? I am seeing in the Nortan Antivirus log that its blocking my page from loading because of a "Privacy" problem. I don't understand why this is happening because the code should be compiled and run on the server and this problem is on a client machine. The only reason that I think its the Request.UrlReferrer is that if I comment out...
6
6354
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 used location.href to redirect the page to an aspx page, there I try to extract the Request.UrlReferrer which comes out to be null.. When I used the mozilla based(firefox) I was able to get the Request.UrlReferrer info. is there anyway that I...
2
4864
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 then redirect to CheckPW.aspx to check the password. There is a text box and button in CheckPW.aspx, I write an Click event in CheckPW.aspx: If password is correct
0
1448
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 I've tried this code similar to an example in help Dim HttpReq As Uri = Request.UrlReferrer labMessage.Text = Request.UrlReferrer.Host ListBox2.Items.Add(HttpReq.Port & " (abs path)")
2
6819
by: deepak.bhardwaj | last post by:
Hi, I have implemented the IHttpHandler interface for generating images and writing them to response stream in binary format. I use an IHttpHandlerFactory to instantiate that handler. A .aspx page sends a request to the factory which then instantiates an instance of the handler. The response is read by a third party component that then displays the image. i.e. inside .aspx page:
0
1712
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 Ref = Request.UrlReferrer.ToString()
0
1149
by: Michael Nemtsev [MVP] | last post by:
Hi, Does anybody have site under NLB Service? I wonder what Request.UrlReferrer returns in this case? I'm asking because today found that when clients put site under NLB all postbacks comes with internal URL name, not the NLB host name (they use WCSF) It looks that if you are open www.mycompanysite.com NLB redirect your request to internal http://corpweb:2152/. It's ok, but for some dynamically generated buttons on several pages we...
0
8420
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8740
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.