SitePoint Sponsor |
|
User Tag List
Results 1 to 11 of 11
-
Dec 14, 2011, 03:39 #1
- Join Date
- Feb 2006
- Location
- Chepstow, South Wales
- Posts
- 915
- 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 %>
-
Dec 14, 2011, 05:03 #2
- Join Date
- Feb 2006
- Location
- Chepstow, South Wales
- Posts
- 915
- 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 %>
-
Dec 14, 2011, 10:52 #3
- Join Date
- Apr 2009
- Posts
- 359
- 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
-
Dec 14, 2011, 13:04 #4
- Join Date
- Feb 2006
- Location
- Chepstow, South Wales
- Posts
- 915
- 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
-
Dec 15, 2011, 03:53 #5
- Join Date
- Feb 2006
- Location
- Chepstow, South Wales
- Posts
- 915
- 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.
-
Dec 31, 2011, 04:29 #6
- Join Date
- Feb 2006
- Location
- Chepstow, South Wales
- Posts
- 915
- 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
-
Dec 31, 2011, 04:31 #7
- Join Date
- Feb 2006
- Location
- Chepstow, South Wales
- Posts
- 915
- 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
-
Jan 1, 2012, 19:48 #8
- Join Date
- Apr 2009
- Posts
- 359
- 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
-
Jan 9, 2012, 05:39 #9
- Join Date
- Oct 2002
- Location
- Scotland
- Posts
- 3,631
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
-
Oct 11, 2012, 15:46 #10
- 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
%>
-
Oct 12, 2012, 04:36 #11
- 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.
Bookmarks