SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Chepstow, South Wales
    Posts
    911
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error 500 - Using ASP need to use .net v2.

    Morning all,
    I have just uploaded a site using classic asp and connecting to a access database as its only a very small site and it was cheap for the client.

    Anyway, I'm getting a 500 - Internal Server Error on the page where I'm connecting to the database, and on looking into it on the hosts forums I need to have .net v2, so wondered if anybody could help me change the little amount of code I have so it works on their servers.

    The main part of the code is below:

    Code:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <%
    ' Get current category
    cat = TRIM(Request( "cat" ))
    IF cat = "" THEN cat ="Home"
    %>
    <%
    'initialise objects and variables
    dim conn, strsql, rsuser, evuser
    set conn=server.createobject("ADODB.Connection")
    set rsuser=server.createobject("ADODB.Recordset")
    strMDBpath = Server.MapPath(".\db_import\EventStyle.mdb")
    
    'direct connection
    conn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & strMDBPath
    %>
    Cheers

  2. #2
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Chepstow, South Wales
    Posts
    911
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then I have the code below being pulled into that page above using an include.

    Code:
    <%
    ' Get current category
    cat = TRIM(Request( "cat" ))
    IF cat = "" THEN cat ="Home"
    %>
    
    <%
    'initialise objects and variables
    'dim evuser, strsql
    'set conn=server.createobject("ADODB.Connection")
    set evuser=server.createobject("ADODB.Recordset")
    'strMDBpath = Server.MapPath(".\db_import\EventStyle.mdb")
    
    'direct connection
    'conn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & strMDBPath
    
    strsql = "SELECT cat_ID, art_Title, art_Category, art_BDescription, art_ThumbFull, art_ThumbFace, art_Display, art_Status, art_Price " &_
    "FROM eventDisplay WHERE art_Category='" & cat & "' " & "AND art_Display=1 " &_
    "ORDER BY art_Title DESC"
    
    response.Write(cat_ID)
      
    evuser.open strsql, conn
    
    %>
    <%
    WHILE NOT evuser.EOF
    %>
    <a href="#" onclick="return popitup('popupex.asp?catList=<%=Server.URLEncode( evuser( "art_Title" ) )%>&catTitle=<%=Server.URLEncode( evuser( "art_Category" ) )%>')" title="Antique <%= cat %> - <%=evuser( "art_Title" )%>"><img src="./Images/uploaded/<%=evuser( "art_ThumbFull" )%>"height="400" border="0" style="border:#999999 solid 1px; margin-right:auto; margin-left:auto; margin-top:5px;" title="Antique <%= cat %> - <%=evuser( "art_Title" )%>"/></a>
    
    <%
    evuser.MoveNext
    Wend
    %>
    <%
    'close resources used
    evuser.close
    'conn.close
    
    'clean up
    set evuser=nothing
    'set conn=nothing
    %>

  3. #3
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    358
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    First, in you IE browser turn off the "show friendly http errors" setting and you may get a much more informative error message.

    My guess is your server doesn't have the Jet database drivers installed on it, with newer versions of windows the access drivers are no longer installed by default.

    Your code seems to be all classic asp so you should have no dependencies on any version of NET.
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  4. #4
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Chepstow, South Wales
    Posts
    911
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes i see...

    I didnt know that, so tomorrow I will have a look at the error, and if specific I'm probably better to see about that.

    Thanks

  5. #5
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Chepstow, South Wales
    Posts
    911
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi back on it now, I turned off the friendly error setting and it didnt give me any indication of the error, its still showing the same page.

    w w w antiqueclocks co

    It occurs on any of the categories, such as 'wall Clocks' etc across the nav.

  6. #6
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Chepstow, South Wales
    Posts
    911
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Could somebody please take a look at the code above and tell me which version of asp it is.

    I am having some problems with my host and they need to configure the servers to the version of asp im using.

    Cheers

  7. #7
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Chepstow, South Wales
    Posts
    911
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Doug, could you tell me if you know what version of asp i am using above.

    The hosts want to know and it seems a bit strange to me, but its what they are asking for.

    Cheers

  8. #8
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    358
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Like I said, your code appears to be classic asp, not asp.NET. If your host doesn't know what specific version of classic asp they support on their servers perhaps you need a different host. With Microsoft IIS servers asp is part of IIS, not an add-on, and the actual asp version isn't anything you need to worry about in most cases. You should ask your host to give you the exact version of the web server they're running.

    I still will guess your server doesn't have the proper database drivers installed.
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  9. #9
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by multichild View Post
    w w w antiqueclocks co
    Can you clarify the link please? .co.uk simply bounces to a "buy this domain" placeholder, and .com simply shows a logo then below it "Failed to load page content". (In IE - in Chrome I just get a blank screen).
    Ian Anderson
    www.siteguru.co.uk

  10. #10
    SitePoint Member
    Join Date
    Oct 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <%
    ' Get current category
    cat = TRIM(Request( "cat" ))
    IF cat = "" THEN
    cat ="Home"
    END IF

    'initialise objects and variables
    dim conn, strsql, rsuser, evuser
    set conn=server.createobject("ADODB.Connection")
    set rsuser=server.createobject("ADODB.Recordset")
    strMDBpath = Server.MapPath(".\db_import\EventStyle.mdb")

    'direct connection
    conn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & strMDBPath
    %>

  11. #11
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    No. OP's original line was perfectly valid.

    OP never did return with the proper URL.
    Ian Anderson
    www.siteguru.co.uk


Bookmarks

Posting Permissions

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