Thread: Testing server
View Single Post
  #16 (permalink)  
Old January 31st, 2010, 01:38 AM
leonardpogrady leonardpogrady is offline
Authorized User
Join Date: Jan 2010
Location: Whitsundays Australia
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default Testing server

Hi Old Pedant and Imar,

I have rebuilt my login page, DSN (collectoz), Server Behaviours (Log In User definition box)
The new set up looks like this-
DSN – ODBC Microsoft Access Setup
Data Source Name: collectoz
Description: collectoz
Database: C:\... \asp\database\users.mdb
System Database: None
DSN collectoz test: Connection was made successfully. Application Database panel shows editable + and the connection and the tables can be viewed. (A first)
Server behaviour panel shows an editable + and Log In User, is the connection name, if double clicked Log In User Dialog Box Settings as follows-
Get Input From Form: Log In Form is default but is faded?
User Name Field: User ID Password Field: Password Validate Using Connection: collectoz
Table: Clients Username Column: UsrName Password Column: Pasword (less the second s not allowed) If Log In Succeeds, Go To: ssl/Login.asp If Log In Fails Go To: ssl/accessesdenied
Restrict User Access: Username and Password by default.
The above server behaviours match my MS Access Database users.mdb, the table clients matches all the above columns.
The File online.asp (my log In Page) starting code follows, you can see the first include file statement it requests (collectoz.asp). I did not include all the code for online.asp file as I think what I have shown does all the login handling and starts the new page that should run if correct user/password is used. I will show the starting code for online.asp, all the code for collectoz.asp This is what happens when I run the site local in Dreamweaver. I select default.asp in DW and press F12, it runs in browser with URL C:\Sites\Test Web Work\asp\TMP1gq72x3i1i.htm I select rollover image JMS it runs URL C:\Sites\Test Web Work\asp\Marketing.asp I select rollover image log In link it runs but shows code only, URL C:\Sites\Test Web Work\asp\online.asp I click the refresh button and it now displays the page properly, I input User Name: Len O’Grady, Password: guest and they are valid for my log In. Click Log In and I get Internet Explorer Can Not Display Page URL res://ieframe.dll/dnserror.htm You are probable going to ask what Internet Information Services - ISS V5.1
Online.asp starting code as follows- The whole code for the collectoz.asp file that is called follows after after below code.

<!--#include file="Connections/collectoz.asp" -->
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
If MM_valUsername <> "" Then
  set MM_rsUser = Server.CreateObject(MM_flag)
  MM_rsUser.ActiveConnection = MM_collectoz_STRING
  MM_rsUser.Source = "SELECT UsrName, Pasword"
  If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
  MM_rsUser.Source = MM_rsUser.Source & " FROM Clients WHERE UsrName='" & Replace(MM_valUsername,"'","''") &"' AND Pasword='" & Replace(Request.Form("Password"),"'","''") & "'"
  MM_rsUser.CursorType = 0
  MM_rsUser.CursorLocation = 2
  MM_rsUser.LockType = 3
  If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then 
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername
    If (MM_fldUserAuthorization <> "") Then
      Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
      Session("MM_UserAuthorization") = ""
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And false Then
      MM_redirectLoginSuccess = Request.QueryString("accessdenied")
    End If
  End If
End If
Dim strUserID
strUserID = "x"
if(Request.Form("UserID") <> "") then strUserID = Request.Form("UserID")
Dim strPassword
strPassword = "1"
if(Request.Form("Password") <> "") then strPassword = Request.Form("Password")
If strUserID <> "x" Then
If Not dbconn.EOF Then
Response.Redirect "../ssl/login.htm" 
Response.Redirect "loginfailed.asp"
End If
End If
All of the code for collectoz.asp file as follows-

' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_collectoz_STRING
MM_collectoz_STRING = "dsn=collectoz;"
I must be getting close? Any idea why I am getting- Internet Explorer Can Not Display Page URL res://ieframe.dll/dnserror.htm


Leonard P. O'Grady
Reply With Quote