Request.UrlReferrer doesn't work

F

-=franz=-

do you have any ideas why this code doesn't work?
i have 2 pages in 2 different domains: a.html; b.aspx

a.html (i make a redirect)
_____
<script language='JavaScript1.2'>
function redirect(){window.location='http://www.xx.it/b.aspx';}
</script>
<BODY onload='redirect()'>
</body>
_____

b.aspx (i check to come from a.html)
_____
r1: Dim p As Uri = Request.UrlReferrer
r2: Dim ps As String = p.AbsoluteUri.ToString()
_____


i receive an error in row2 that say that the istance is not an object
(translating from italian (-; )
with debug i can see that already in row1 it doesn't find anything and "p"
stay ampty.

anybody knows what can i do?
i can't change the page a.html


thanks
franz from italy (again (-; )
 
J

Joerg Jooss

-=franz=- said:
do you have any ideas why this code doesn't work?
i have 2 pages in 2 different domains: a.html; b.aspx

a.html (i make a redirect)
_____
<script language='JavaScript1.2'>
function redirect(){window.location='http://www.xx.it/b.aspx';}
</script>
<BODY onload='redirect()'>
</body>
_____

b.aspx (i check to come from a.html)
_____
r1: Dim p As Uri = Request.UrlReferrer
r2: Dim ps As String = p.AbsoluteUri.ToString()
_____


i receive an error in row2 that say that the istance is not an object
(translating from italian (-; )
with debug i can see that already in row1 it doesn't find anything
and "p" stay ampty.

anybody knows what can i do?

There's no guarantee that you'll receive a referrer header, and upstream
proxies could change its values anyway.

Cheers,
 
Top