INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

IIS6 Migration to IIS8, cannot browse .ASP pages

IIS6 Migration to IIS8, cannot browse .ASP pages

(OP)
HI

Firstly, I want to say that I am VERY limited in my exposure to IIS and ASP!

I have managed to migrate an IIS6 website to an IIS8 set-up on a 2012 server (This took a very long time!). My default page is working perfectly and I can browse to it from within IIS manager with no issue, however, when I try to browse to other pages I am greeted with an HTTP 500 Internal Server Error and I cannot work out why! The website is configured using version 2 classic.

The code for one of the offending ASP files is as below so hopefully someone will no the answer!!

<html >


<%


Dim oConn
Dim ConnectionString
Dim lngJobNo
Dim pDate


ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\cts-srv01\apps\db\db.mdb"
lngJobNo = Request.QueryString ("JobNo")

Set oConn = Server.CreateObject ("ADODB.Connection")
oConn.ConnectionString = ConnectionString
oConn.Open

Dim oRS
Set oRS = server.CreateObject ("ADODB.Recordset")

oRS.Open "SELECT * FROM [qryJobEmail] WHERE JobNo=" & lngJobNo ,oConn ,1,3

Dim strJobType

If oRS.RecordCount = 0 Then
Response.Write "No Job Found"
oRS.Close
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
Response.End
End If


%>

<head >


<%

If oRS("Eng_Service") Then
strJobType = "Service"
End If

If oRS("Eng_Breakdown") Then
strJobType = "Breakdown"
End If

If oRS("Eng_Commission") Then
strJobType = "Commission"
End If

If oRS("Eng_Other") Then
strJobType = "Other"
End If


%>


<title >Job No: <%=oRS("JobNo") %></title>

<style type ="text/css" >
p{Font-Size: 10pt; Font-Family: Arial;}
.legend { Font-Size: 10pt; Font-Family: Arial;Display:Block;margin-bottom: 2px;margin-top: 2px;font-weight:bold;}
.field {
margin-bottom: 2px;
Font-Size: 10pt;
Font-Family: Arial;
border-width:1pt;
background-color: #EEEEEE;
font-weight:bold;
color: #0000ff;
word-wrap: break-word;
}

.divbox {border-width:1pt;border-style: solid;margin: 5px;padding:5px;background-color: #FEFEFE;}
</style>


</head>

<body >


<p><%=Date()%></p>

<p><b>Re: <%=oRS("ST_SITENAME")%></b></p>

<p>Please find attached ( <%=strJobType%> ) for job number <%=oRS("JobNo")%> as carried out by engineer <%=oRS("Eng_Name")%> on <%=oRS("Job_Start")%></p>

<p>If we can be of any further assistance please do not hesitate to contacts the service team on 0845 208 2530.</p>

<p>Yours sincerely<br>CHANNEL TECHNICAL SERVICES</p>

</body>

<%

oRS.Close
set oRS = Nothing

oConn.Close
Set oConn = Nothing


%>

</html>



Many thanks.

Steve

RE: IIS6 Migration to IIS8, cannot browse .ASP pages

Under IE/options/Advanced, uncheck "Disable script debugging". When it hits the error, it will give you a lot more info - like which line it doesn't like.

Also, what is IngJobNo - a string or a number? If it is a string, it should be in primes.

RE: IIS6 Migration to IIS8, cannot browse .ASP pages

(OP)
Hi xwb

I have done as you suggested and no further error(s) are displayed! Also, IngJobNo is a numeric.

I wondered whether the error may be something to do with the connection string....what do you think?

Thanks

Steve

RE: IIS6 Migration to IIS8, cannot browse .ASP pages

I think the option xwb meant is unchecking "Show friendly HTTP error messages". This should give you a better error message.

RE: IIS6 Migration to IIS8, cannot browse .ASP pages

At a guess it is your select statement. Try & cstr(IngJobNo)

RE: IIS6 Migration to IIS8, cannot browse .ASP pages

(OP)
Hi Guitarzan

I saw that option as well and I have unchecked that also...no further forward!

I have installed IIS tracing and enabled Failed Request Tracing but even with that I do not get any log files!

I have since found some logfiles within c:\Inetpub\logs\logfiles\W3SVC1 and it is advising that it cannot access my Access database as it is already opened exclusively by another user or you need permission to view it's data. I'm convinced that is actually a security issue but don't know where to go with it!!

HELP!!!

Thanks

Steve

RE: IIS6 Migration to IIS8, cannot browse .ASP pages

Check the user rights to the MDB file. Are you using anonymous access? if so you have to give the IUSR built-in account write-access.

RE: IIS6 Migration to IIS8, cannot browse .ASP pages

(OP)
The mdb file is on a different server to the IIS, does that suggestion still apply?

RE: IIS6 Migration to IIS8, cannot browse .ASP pages

If it is access, you should get 401 or 403. Try using binary chop - comment out all the vbs code between the open and the close. Do you still get the error? If you don't then uncomment the select statement etc and rerun.

RE: IIS6 Migration to IIS8, cannot browse .ASP pages

>The mdb file is on a different server to the IIS, does that suggestion still apply?

I never tried accessing an MDB on a remote server. The article below implies that it is not easy to do at best, although the article is quite old and is about IIS6.
http://databases.aspfaq.com/database/why-can-t-i-a...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close