By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,864 Members | 1,320 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,864 IT Pros & Developers. It's quick & easy.

Getting Request URL in Session_Start

P: n/a
Hi all,

I am trying to set up an affiliate program so I've been adding code to
the Session_Start in global.asax. I am passing an affiliate ID via
the query string so would like to parse this value out when a user
gets redirected to our site and then do some database work. The
problem is that it looks like I can't access the correct referring url
and the query string. When I debug and try to print the value of both
Context.Request.Url.ToString and Context.Request.UrlReferrer they are
coming up as blank or with another internal application url
(depeneding on when and how I run it). All I would like to know is
can I get the external referring url and it's query string in the
Session_Start?

Thanks for your help
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Tue, 12 Apr 2005 13:24:52 -0400, wrecker <wr*****@wrecked.com>
wrote:

I found out what my problem was; I was testing on localhost. As soon
as I ran the code on our development box and linked to it from an
extrenal page everything worked. Simple answer - wish I'd thought of
it sooner :/

Hi all,

I am trying to set up an affiliate program so I've been adding code to
the Session_Start in global.asax. I am passing an affiliate ID via
the query string so would like to parse this value out when a user
gets redirected to our site and then do some database work. The
problem is that it looks like I can't access the correct referring url
and the query string. When I debug and try to print the value of both
Context.Request.Url.ToString and Context.Request.UrlReferrer they are
coming up as blank or with another internal application url
(depeneding on when and how I run it). All I would like to know is
can I get the external referring url and it's query string in the
Session_Start?

Thanks for your help


Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.