473,804 Members | 3,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3108
On Tue, 12 Apr 2005 13:24:52 -0400, wrecker <wr*****@wrecke d.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.Reques t.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_Star t?

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
3397
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" in WebConfig.> Session state is also not set to readonly in any page directives. I set a session variable in the Session_Start event that gets changed
0
1148
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 all the settings that I have set before. Does anyone know what cause to this problem and how can I fix it?
19
7929
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 limiter - headers already sent in /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php on line 14
7
9300
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" > </form>
15
5959
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, but I get an error that says the index isn't defined. The second two calls are AJAX-generated. The second call immediately echos the $_SESSION variable back after it sets it, and it sets it properly. But the subsequent request doesn't see...
1
3203
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 follows: The code below is for the first page:session_start is in line 3 <link href="css/jobSheet.css" rel="stylesheet" type="text/css" /> session_start();
0
2293
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), inside the Session_Start event of the global.asax.vb file, since this variable is accessed by almost all the pages in the project. Besides this variable, there are other session variables which are set in the various aspx pages, as needed.
10
2253
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 must be done whether he is an valid user or not (connect to database and check for valid user & password) if he is valid user he must login and goto another php file..... im using winxp OS / XAMPP Windows Version 1.6.4 ! Problem: im getting...
2
2940
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 frame2.php (normally login / pass here but //removed unesecery code) just to show example
0
9588
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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
10085
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
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...
1
7625
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
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
3
2999
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.