473,387 Members | 1,779 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,387 software developers and data experts.

Emulating Referrer URL?

I'm working on an application that does a load of processing on
Session_Start if a new session is started having come from a particular
referrer. To determine this I use Request.UrlReferrer.

How can I debug this code on my local machine? Is there a way to emulate a
new session being started via a redirect from a referrers URL? Possibly by
having another local app pass something in the HTTP headers to my main app?

Thanks

Ben
Dec 14 '05 #1
4 1365
if it's simply for debugging purposes, you can simply change the value in
the debugger. You'd have to do it for every debugging session but it's a
quick fix

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------

"Ben Fidge" <Be******@discussions.microsoft.com> wrote in message
news:FC**********************************@microsof t.com...
I'm working on an application that does a load of processing on
Session_Start if a new session is started having come from a particular
referrer. To determine this I use Request.UrlReferrer.

How can I debug this code on my local machine? Is there a way to emulate a
new session being started via a redirect from a referrers URL? Possibly by
having another local app pass something in the HTTP headers to my main app?
Thanks

Ben

Dec 14 '05 #2
its a bad idea to design much logic around Request.UrlReferrer as privacy
software (and some proxies) strip it.

-- bruce (sqlwork.com)

"Ben Fidge" <Be******@discussions.microsoft.com> wrote in message
news:FC**********************************@microsof t.com...
I'm working on an application that does a load of processing on
Session_Start if a new session is started having come from a particular
referrer. To determine this I use Request.UrlReferrer.

How can I debug this code on my local machine? Is there a way to emulate a
new session being started via a redirect from a referrers URL? Possibly by
having another local app pass something in the HTTP headers to my main
app?

Thanks

Ben

Dec 14 '05 #3
Didn't know that. A lot of my clients users come in from Google and Overture
sites so they would like to see how much traffic is coming in from where.
Basically they don't trust Google and Overtures reporting of traffic
redirections.

Can you suggest a better way?
"Bruce Barker" <br******************@safeco.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
its a bad idea to design much logic around Request.UrlReferrer as privacy
software (and some proxies) strip it.

-- bruce (sqlwork.com)

"Ben Fidge" <Be******@discussions.microsoft.com> wrote in message
news:FC**********************************@microsof t.com...
I'm working on an application that does a load of processing on
Session_Start if a new session is started having come from a particular
referrer. To determine this I use Request.UrlReferrer.

How can I debug this code on my local machine? Is there a way to emulate
a
new session being started via a redirect from a referrers URL? Possibly
by
having another local app pass something in the HTTP headers to my main
app?

Thanks

Ben


Dec 15 '05 #4
Good idea. Thanks a lot.
"Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
news:OE**************@TK2MSFTNGP10.phx.gbl...
if it's simply for debugging purposes, you can simply change the value in
the debugger. You'd have to do it for every debugging session but it's a
quick fix

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------

"Ben Fidge" <Be******@discussions.microsoft.com> wrote in message
news:FC**********************************@microsof t.com...
I'm working on an application that does a load of processing on
Session_Start if a new session is started having come from a particular
referrer. To determine this I use Request.UrlReferrer.

How can I debug this code on my local machine? Is there a way to emulate
a
new session being started via a redirect from a referrers URL? Possibly
by
having another local app pass something in the HTTP headers to my main

app?

Thanks

Ben


Dec 15 '05 #5

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

Similar topics

5
by: Ryann | last post by:
Hello. I had a strange entry in my referrer logs. The http-referrer reported that the user came from another site. But the file it claimed to come from a pdf file. I followed the link back and...
1
by: kuok benny | last post by:
Hi, I am trying to use the document.referrer to get the referrer of my home page. Occationally, I get the value of 'blockedReferrer'. Actually how this happen, how the client blocked the...
1
by: brett | last post by:
When I use this code: <select name="status" onChange = "location.href=this.options.value"> <option value="mypage.htm">Select View</option> </select> I don't have a referrer. When I click an...
2
by: Goober | last post by:
I have to determine the document.referrer of the individual coming to my site. I want to send everyone not coming from one of those sites to an alternate location (The names below are just used as...
1
by: Mike Dee | last post by:
Hi All - I'm having a strange problem I'm wondering if anyone can shed some light on. When I use ASP or ASP.NET code to get the referrer information from the server side, it comes back as null. ...
1
by: Ben Fidge | last post by:
I'm working on an application that does a load of processing on Session_Start if a new session is started having come from a particular referrer. To determine this I use Request.UrlReferrer. How...
2
by: Fernando Rodríguez | last post by:
Hi, Is there a way to turn the document.referrer string into a Location like object, so I can extrac the domain and other parts of it? Thansk
5
by: Nospam | last post by:
does anyone know if there is anything wrong with this code? <SCRIPT LANGUAGE="JavaScript">document.referrer.indexOf("http://www.example.com") != -1){ ...
1
by: Nospam | last post by:
I have a site http://www.example.com, and I want to link to an article on another site http://www.example2.com, how would I use the site http://www.example.com , as a referrer to the article on the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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?
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
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
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...

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.