Jim Lawrence (AccessD)
accessd at shaw.ca
Thu May 6 20:13:02 CDT 2004
Hi Paul: There are a whole wack of issues that may not allow your code to run. The first thing to do is to make sure that have your virtual site set up. 1. This is done through your IIS, 'Default Web Site'. (This is your base site template.) 2. Go to the 'Home directory' tab, Configuration button, application mapping and make sure the '.asp' extension is mapped. Assuming that the '.asp' extension is displayed and the appropriate 'asp.dll' is there...you can check the directories to be overly careful. 3. Double click, to see if all HTML processes are activated 'POST,GET, etc...'. 4. Then the 'Application' Option tab and make sure VBScript is the default. (Not necessary but let's keep things simple.) 5. On the 'Home Directory' tab, make sure that the 'Execute Permission' has 'Script Only' selected, at least. 6. On your 'Documents' tab, if you are starting your website, running an asp file, you have to add something like 'index.asp' or 'default.asp'. (This is only done if you do not want have to key in the start file (index.asp) every time.) 7. If you are not logging into the server through a networked station, in order to run a locally stored web page, you have to access it like: 'http://localhost/MyWebSiteDirectory/index.asp'. (Note if you are accessing the web site, on your server, from your network station, use something like: http://192.168.123.1/MyWebDirectory/index.asp. 8. Make sure you website directories 'everyone' permission, READ should be good enough. This is a start. If that does not work we can try more. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 1:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: <HTML> <HEAD> <TITLE>Orridge Reporting Logon</TITLE> </HEAD> <BODY Background="Niceblue.jpg"> <CENTER> <H1><I><FONT FACE="Century" COLOR="WHITE">Orridge & Co. Internet Reporting System</FONT></I></H1> <H3><FONT FACE="Century" COLOR="WHITE"><I>Enter Username & Password Below</I></FONT></H2> <HR WIDTH="100%"> <FORM METHOD=Post ACTION="CheckLogin.asp"> <FONT FACE="Courier New" COLOR="BLACK"><B>Username:</B></FONT> <INPUT TYPE=Text NAME="Username" SIZE="30"> <P> <FONT FACE="Courier New" COLOR="BLACK"><B>Password:</B></FONT> <INPUT TYPE=Password NAME="Password" SIZE="30"> <P> <INPUT TYPE=Reset NAME="Reset" VALUE="Reset"> <INPUT TYPE=Submit NAME="Submit" VALUE="Submit"> </FORM> <HR WIDTH="100%"> </CENTER> </BODY> </HTML> checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <!--#Include Virtual="/ADOVBS.INC"--> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "<A HREF='Default.HTM'>" Response.Write "User Not Registered." Response.Write "</A>" Response.End Else Response.Write "<A HREF='Default.HTM'>" Response.Write "User Found." Response.Write "</A>" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com