Response object error 'ASP 0158 : 80004005'

  • Thread starter Thread starter flivesay
  • Start date Start date
-----Original Message-----
I get this message when trying to use a logon page--
anyone know the solution?

ASP 0158 means "Missing URL. A URL is required."

80004005 is usually a database error.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
It would be helpful if you posted the code which caused this error.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Hi,
guessing here without the code but do you have a login system that works
like this
1/ user requests protected page
2/ not logged in so redirect to login.asp
3/ user logs in response.redirect to page he originally wanted
The error is caused by trying to response.redirect to an empty url so you'd
need to do something like this
at the top of a secured page
<%
if ' user is not authenticated then
response.redirect
"Login.asp?page=<%=server.urlencode(request.servervariables("script_name"))%
end if
%>
on the login page
<%
if request.form <> "" then
' check user credentials
' if we get here he's logged in redirect him
' either to the page he wanted or a default page
if request("page") <> "" then
response.redirect request("page")
else
response.redirect "DefaultLoggedInPage.asp
end if
else
%>
<form method="post" action="login.asp">
' user and pass fields here
<input type="hidden" name="page" value="<%=request("page")%>">

We check for a page before doing the redirect

Does this help you?

Jon
Microsoft MVP - FP
 
Back
Top