Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import Database Website Wizard "login.asp" not working

Status
Not open for further replies.

UKManSwed

Technical User
Joined
Sep 29, 2003
Messages
2
Location
SE
Hi, first of all my FrontPage and OS is Swedish, so i hope i am translating these syntaxes correctly.

Scenario:
I am using XP Pro with IIS installed as the server for viewing the website locally. Also the Office XP Frontpage.

I have imported the database website wizard and installed the default setup including creating a new database. I did all this "without" the login alternative just to try it out. It all worked perfectly.

Then i decided to try out the option for using a login page to be able to edit or change the database. When i now try to login, the page just stays there without referring me to the "database_editor.asp" page. I even tried to open up the "database_editor.asp" page directly but it just points me back to the "login.asp" page. Tried to login again, but nothing happens.

I get NO error messages, only if i try to login with the wrong username or password. This tells me that at least the verification seems to be working.

I am using ALL the default pages created by the wizard and have made NO changes whatsoever. I can view the "results_page.asp" page and can even use the "submission_form.asp" page to add new posts to the database.

The wizard created the default directory in my and of course i use the "localhost" syntax to open up the website locally.

Any suggestions please. By the way, i am also using ZoneAlarm Pro if that could be the problem, but i might also add that i have put "localhost" in the trusted zone. IIS is NOT allowed access to the Internet as i am not considering having a website locally, i am just testing this out for now.

Peace
UKMan
 
Look in the code for the login.asp page and make sure the form is set to submit to the Login_validate.asp.
Then check the Login_Validate.asp to make sure that the last bit of code on the page is something like:

' redirect to default page.
Response.Redirect "database_editor.asp"

HTH
Tiffany


Microsoft MVP - FrontPage
 
Hi Noconi, thanks for the time.
Yes, both pages have the code. I have checked and double checked that each asp/asa file contains the correct code. I even deleted everything a couple of times and re-made the whole site again, but to no avail.

Here is an edited version copy of those 2 files:

login.asp:
Code:
<FORM ACTION=&quot;Login_Validate.asp&quot; METHOD=&quot;post&quot;>
<p>
<h3>Login to edit the Database</h3>
<br>
<p>
<TABLE BORDER=0>	
	<TR>
		<TD ALIGN=&quot;right&quot;>Username:</TD>
		<TD><INPUT TYPE=&quot;text&quot; NAME=&quot;login&quot; size=&quot;10&quot; VALUE='<%=Request.Cookies(&quot;login&quot;)%>'></INPUT></TD>
	</TR>
	<TR>
		<TD ALIGN=&quot;right&quot;>Password:</TD>
		<TD><INPUT TYPE=&quot;password&quot; NAME=&quot;password&quot; size=&quot;10&quot; VALUE='<%=Request.Cookies(&quot;pass&quot;)%>'></INPUT></TD>
	</TR>
	<TR>
	  <TD>
	     
	  </TD>
	  <TD>
	     
	  </TD>
	</TR>
	<TR>
		<TD align=&quot;left&quot;>
		  <INPUT TYPE=&quot;submit&quot; VALUE=&quot;Log in&quot;></INPUT>
		</TD>
		<TD>
		</TD>
	</TR>
</TABLE>
</FORM>

Login_Validate.asp:
Code:
<%
if Request.Form(&quot;login&quot;) <> Username or Request.Form(&quot;password&quot;) <> Password then
       MsgErr = &quot;<h3>Verification failed.</h3>&quot; & &quot;<br>&quot; & &quot;<a href=login.asp>Try again.</a>&quot;
       Response.Write MsgErr

Else
   	Response.Cookies (&quot;pass&quot;) = Request.Form(&quot;password&quot;)
   	Response.Cookies (&quot;login&quot;) = Request.Form(&quot;login&quot;)

'   	Response.Cookies.Expires = DATE + 1

' redirect to default page.
   	Response.Redirect &quot;database_editor.asp&quot;
End if
%>

I have edited out the Swedish comments, but this is how it looks anyway.

Peace
UKMan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top