Http 1.0/501 Not Supported

Results 1 to 4 of 4

Thread: Http 1.0/501 Not Supported

  1. #1
    Jeff S Guest

    Default Http 1.0/501 Not Supported

    I get the message when I link to my &#039Validate.asp&#039 page:<BR><BR>HTTP/1.0 501 Not Supported <BR><BR>My ODBC connection (Access) has been tested successfully. I presume I have an outdated version or a missing componenet in the project. The code in the Validate.asp is as follows:<BR><BR>&#060;%@ Language=VBScript<BR>&#039Read the UserID & Password from the form<BR>dim sUserID, sPassword<BR>sUserID = Request.Form("BTPUser")<BR>sPassword = Request.Form("BTPPassword")<BR><BR>&#039db connection should have already been made by global.asa <BR>dim DBConn<BR>set DBConn=server.CreateObject ("ADODB.connection")<BR>DBConn.ConnectionString = "DSN=Clients"<BR>DBConn.open<BR>dim strSQL<BR>strsql = "select * from BTPSecurity where UserID = &#039" & sUserID & "&#039 & _<BR> " and Password = &#039" & sPassword & "&#039"<BR> <BR>dim rs <BR>set rs = DBConn.Execute(strsql)<BR>if not rs.eof then<BR> session("bolAuthenticated")=true<BR>else<BR> Response.Redirect "/notvalidated.asp"<BR>endif<BR>DBConn.Close <BR> %&#062;<BR>&#060;HTML&#062;<BR>&#060;HEAD&#062;<BR >&#060;META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"&#062;<BR>&#060;/HEAD&#062;<BR>&#060;BODY&#062;<BR><BR>&#060;P&#062 ;*&#060;/P&#062;<BR><BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR><BR><BR>I will appreciate any insight you can provide.<BR><BR>Thanks.

  2. #2
    John Weeflaar Guest

    Default RE: Http 1.0/501 Not Supported

    An error message can sometimes mislead.<BR>Here are the lines that I think, need to be modified:<BR><BR>1. Replace &#060;%@ Language=VBScript <BR> with &#060;%<BR><BR>2. Add a double quote before & _ :<BR> strsql = "select ... where UserID = &#039" & sUserID & "&#039" & _<BR><BR>Hope that helps.<BR><BR>John<BR>

  3. #3
    Jeff S Guest

    Default RE: Http 1.0/501 Not Supported

    John, I appreciate your input....unfortunately same result. I agree, the missing double quote is definitely a problem. I notice when I remove the &#039@language=vbscript&#039 that the yellow highlighting disappears....leading me to believe that the editor does not consider it to be legitimate asp code.<BR><BR>I&#039ve tried placing breakpoints in my vbscript code, but it never gets to a breakpoint. I&#039ve yet to invoke a breakpoint....I&#039ve coded in VC++ and VB...no sweat for debugging. What do I have to do to debug this code?

  4. #4
    John Weeflaar Guest

    Default RE: Http 1.0/501 Not Supported

    Jeff, I haven&#039t used any ASP or VBScript debugging tools, but here is an easy way just to locate where your error is.<BR>TestError() is just a simple procedure to print the error<BR>when happening in one line.<BR>Place "Call TestError()" in several places.<BR>and just make it on one at a time right from the top.<BR>(add &#039 to turn off the Sub). If there is no error<BR>in one line. add a &#039 to turn off and turn on the next<BR>one, etc, until you locate where it is. Then you can<BR>clean up this debugging code after that.<BR>Of course there is a better tool for debugging.<BR><BR><BR>&#060;% @ Language="VBScript" %&#062;<BR>&#060;% <BR>Sub TestError()<BR>NL = "&#060;BR" & "&#062;" &#039 a new line<BR>If Err &#060;&#062; 0 Then<BR>Response.Write("There is an error" & NL)<BR>Response.Write("Error: " & Err.Description & NL)<BR>Response.Write("Error Number: " & Err.Number & NL)<BR>Response.Write("Error Source: " & Err.Source & NL)<BR>End If<BR>End Sub<BR>%&#062;<BR>&#060;% <BR>ON ERROR RESUME NEXT &#039 if there is an error keep going<BR> &#039 as it will be trapped by TestError()<BR>sUserID = Request.Form("BTPUser")<BR>sPassword = Request.Form("BTPPassword")<BR><BR>dim DBConn<BR>set DBConn=server.CreateObject ("ADODB.connection")<BR>DBConn.ConnectionString = "DSN=Clients"<BR>&#039Try also: DBConn.ConnectionString = "data source=Clients"<BR><BR>Call TestError()<BR>DBConn.open<BR>&#039Call Test Error()<BR>dim strSQL<BR>strsql = "select * from BTPSecurity where UserID = &#039" & sUserID & "&#039" & _<BR>" and Password = &#039" & sPassword & "&#039"<BR>Response.Write(strsql) &#039 Check if the string is right<BR>dim rs <BR>set rs = DBConn.Execute(strsql)<BR>&#039Call TestError()<BR>if not rs.eof then<BR>session("bolAuthenticated")=true<BR>else<B R>Response.Redirect "/notvalidated.asp"<BR>endif<BR>DBConn.Close <BR>%&#062;<BR><BR>Hope it helps.<BR><BR>John


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •