As you seem to already know, UrlReferrer will only work with requests that
load in the same or another browser window invoked via a hyperlink.
No UrlReferrer object is returned when loading pages into a window using
client-side scripting methods.
Also, corporate firewalls can interfere with the ability to get this
information, as can various types of privacy and anti-virus / anti-malware
software.
If all you really need to know is whether somebody "got here" after logging
into your secure site, why not either just put something on the querystring
to your app that determines this or if it is the same application, set a
session variable "LoggedIn" to true, or set a cookie after they have logged
in and then read it when they arrive at your app?
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Sega" wrote:
I am trying to find where my user came from - in particular whether they came
from our application login on our own site or whether they came by keying the
url directly without going through our login.
Currently I am using the following code, but would be happy to change to
something more effective.
Dim MyUrl As Uri = Request.UrlReferrer
If MyUrl Is Nothing Then
gvMyUrl = "nothing"
Else
gvMyUrl = MyUrl.ToString
End If
No matter how the user comes to my app I am getting "nothing". That is to
be expected if keying the URL directly. When using the logon I am still
getting nothing. Is that because it is coming from a secure site (the logon)
to my app which is not on a secure site?
Any ideas how to get this "where from" info.
Thanks for any help I can get. I am desperate to solve this and not really
experienced in this area.