I've written an application that makes use of the HTTP_REFERER server variable to redirect users to a page they just came from. This has worked for everyone that's used the application except one person where they get the following error:
Response object error 'ASP 0158 : 80004005'
Missing URL
/admin_dbupdate.asp, line 10
A URL is required
Any ideas why this is happening??
HTTP_REFERER is blank, you need to check to see if its blank usally using the following would do the trick.
Code:
Dim strReferer
strReferer = Request.ServerVariables("HTTP_REFERER")
If Len(strReferer) = 0 Then
Response.Redirect("Default.asp")
Else
Response.Redirect(strReferer)
End If
Was this answer helpful ?
Yes No
Some firewall software like Norton Internet Security can block http referer from the server, as can some proxy servers.
Was this answer helpful ?
Yes No
Thanks guys. I will put in some validation to check if HTTP_REFERER is blank and I will also ask the guy if they are running any sort of Internet Security products which may block HTTP_REFERER.
Was this answer helpful ?
Yes No
If these are pages on your server then you could setup a function to set the current page and the last page so you will always have a record of where the user came from and can redirect them back.
Was this answer helpful ?
Yes No