Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS6 Migration to IIS8, cannot browse .ASP pages

Status
Not open for further replies.

Halliarse

IS-IT--Management
Jan 8, 2007
213
0
0
GB
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
 
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.
 
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
 
I think the option xwb meant is unchecking "Show friendly HTTP error messages". This should give you a better error message.
 
At a guess it is your select statement. Try & cstr(IngJobNo)
 
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
 
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.
 
The mdb file is on a different server to the IIS, does that suggestion still apply?
 
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.
 
>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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top