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

Getting Request URL in Session_Start

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
1 3079
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jeanne Louw | last post by:
Hi Why would this happen? The Application_Start and Session_Start events fires on each page request on my website. SessionID stays the same between page requests. <sessionState mode="InProc"...
0
by: Hero41Day | last post by:
Hi, I have a really weird problem that started recently. For every page request that I have in my application, the session is reset and the Session_Start is called again. Doing so, I'm losing...
19
by: lawrence k | last post by:
How can I find out where my script is outputting to the screen for the first time? My error logs are full of stuff like this: PHP Warning: session_start(): Cannot send session cache...
7
by: Carl | last post by:
these are three files below : submit.html <html> <head> </head> <body> <form action="redirect.php" method="POST" > <input type="text" name="value" value="test" > <input type="submit" >...
15
by: Evil Otto | last post by:
My page loads, and calls an init() function that returns content to a div on the page, as well as setting a $_SESSION variable. The content it returns includes a link that calls the same variable,...
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
0
by: tharika_c | last post by:
Hi, We have a simple ASP.NET web application where one of the Session variables, called Session("SSO_ID") gets created and assigned a value (equal to the HTTP_HRID request variable value),...
10
by: priyakollu | last post by:
hi guyz! please help me in sorting out error as im unable to find it... my requirement is there will be userid field and password field and "login" button after clicking button certain validations...
2
by: panos100m | last post by:
Hi there I am using a menu frame on the left side but i cant destroy it using the logout link that i created ... any ideas? //index.php // PAGE this will just redirect to 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:
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?
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.