By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,868 Members | 1,974 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,868 IT Pros & Developers. It's quick & easy.

Getting error "500 internal server error" in ASP Win Server 2008

P: 33
Hello,

I have an application developed in ASP with Access as back end. The code starts as follows

Expand|Select|Wrap|Line Numbers
  1. <%@ Language=VBScript %>
  2. <%
  3. set cn=nothing
  4. set rs=nothing 
  5. set rsUser=nothing
  6. set rsVisit=nothing
  7.  
  8. set cn=server.createobject("ADODB.connection")
  9. set rs=server.createobject("ADODB.recordset")
  10. set rsUser=server.createobject("ADODB.recordset")
  11.  
  12. 'if cn.state=adstateopen then cn.close
  13. Connectstr = "DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\inetpub\wwwroot\payment\empdata.accdb;UID=;PWD="
  14.  
  15.  
  16. cn.open connectstr
  17.  
  18.  
  19. Response.Write Request("connectstr")
  20. dim loginname, pwd
  21.  
  22. userid = trim(Request.Form.Item("txtLogin"))
  23. pwd = trim(Request.Form.Item("txtPwd"))
  24.  
  25. Response.Write Request("userid")
  26.  
  27.  
  28. if Request("userid") <> "" then
  29.     empcode = Request("userid")
  30. end if
  31.  
  32. if userid <> "" then
  33.     sqlUser = "Select Password from employee where empcode = " & userid
  34.     rsUser.Open sqlUser, cn, adOpenStatic
  35. end if
  36.  
  37. 'Response.Write Request("FName")
  38. 'Response.Write (userid)
  39.  
  40.  
  41. if Request("userid") = "" then
  42.     if not rsUser.EOF then
  43.         if pwd <> trim(rsUser(0)) then
  44.             Response.Redirect("default.htm")
  45.             request("txtLogin").setfocus                
  46.         end if
  47.     else
  48.         Response.Redirect("Invalid.htm")
  49.     end if
  50. else
  51.     if trim(Request.Form.Item("txtPwdOld")) <> pwd then
  52.         Response.Redirect("Invalid.htm")
  53.     end if
  54. end if
  55.  
It works fine in the system (windows 7) where it was developed. When I installed the same in the server (Windows Server 2008), the login html page is displayed. After giving the password, the following error is displayed:

"500 internal server error - There is a problem with the resource you are looking for"

Can anybody help me in resolving this issue.
Thanks in advance

Matsam
Jun 25 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.