0

EDITED: I've got an MVC application on a webserver inside which a classic asp website is placed. I can get the classic asp website to work correctly on my local machine version of IIS but when I publish to the webserver. Three things happen.

Firstly: I have a banner at the top of the page in a frame, this is a classic asp file. This loads correctly no problem. See code below.

<!--#include file="./forms/chkfunc.asp"-->
<%
session("MySite") = ImportMySite(ToRootedVirtual("/web.config"), "mysite", false)
 %>
<HTML>
<HEAD>
<link REL="stylesheet" TYPE="text/css" href="main.css">
</HEAD>
<BODY class='top'>


<DIV id="logobox">
<IMG SRC="./images/crest.jpg">
</DIV>

<%
If session("MySite")="restart.dev" Then
    response.write("<DIV id='logotext'>Neurosciences - RESTART - Development</DIV>")
End If

If session("MySite")="restart.training" Then
    response.write("<DIV id='logotext'>Neurosciences - RESTART - Training</DIV>")
End If

If session("MySite")="restart" Then
    response.write("<DIV id='logotext'>Neurosciences - RESTART </DIV>")
End If
%>


<DIV id="logoslice" align='center'>
<IMG SRC="./images/RESTART_logo_only.png">
</DIV>


<DIV id="upperbar"><DIV>
<%
response.write(formatdatetime(now(),1))
%>
</DIV>
</BODY>
</HTML>

Secondly: I have a navigation bar on the left hand side of the page in a separate frame which loads a simple asp file called navbar.asp. When loading this page gives me an internal server 500 error and no further details.

Thirdly: I have a main sectio to the right of the navigation bar in a separate frame which loads a simple asp file called body.asp. When loading this page gives me an internal server 500 error and no further details. See code below

<!--#include file="dbconnect.asp"-->
<HTML>
<HEAD>
<link REL="stylesheet" TYPE="text/css" href="main.css">
</HEAD>
<BODY class='main'>
<!--#include file="./MyActions/Notifications.asp"-->
<DIV class='textheader'>
Introduction
</DIV>
<DIV class='textbody'>
Welcome to the Restart web portal.
<P>
<% 
'if session("authenticated")="" Then
    If session("authenticated")=1 then  %>
    Please select an item from the menu on the left to continue. Or click on any outstanding notifications above.<BR>To enlarge the font on any of these pages, please depress the CTRL and + keys on your keyboard. Use CTRL and – keys to decrease font size.<BR>To return to the main RESTART site, click here 
    <% else %>
    Please select LOGIN from the navigation bar, on the lefthand menu, to continue using this site.<BR>To enlarge the font on any of these pages, please depress the CTRL and + keys on your keyboard. Use CTRL and – keys to decrease font size.<BR>To return to the main RESTART site, click 
    <%End if%>
</DIV>
<!--#include file="incbot.asp"-->
</FORM>
</BODY>
</HTML>

I'm stumped as the topbar.asp has classic asp code, an include file and html and as such contains similar code to the other 2 files but these won't load.

With errorMode='Detailed' enabled the error message received is:

An error occurred on the server when processing the URL. 
Please contact the system administrator.
If you are the system administrator please click here to find 
out more about this error.

Does anyone have an idea as to where I should look to resolve this issue. If I was getting internal 500 errors for everything I'd be inclined to believe there was an issue with IIS but loading 1 out of 3 pages correctly has thrown me a curveball.

user692942
  • 16,398
  • 7
  • 76
  • 175
Connor McGill
  • 259
  • 4
  • 17
  • 1
    What do the `500 Internal Server` errors say is the problem, do you get details of which line in which file is triggering the error? If not have you enabled `Detailed Errors` in IIS? Can you post the code of the working file and also one of the erroring files, without code to work from what help do you expect to receive? - See [ask] – user692942 Mar 11 '15 at 12:03
  • If your having problems getting the full error to appear this should help - [Classic ASP on IIS7: refusing to send errors to browser on 500 Internal Server Error](http://stackoverflow.com/a/1455041/692942) – user692942 Mar 11 '15 at 12:18
  • Looking at the updated question, it really depends what those `#include` files are doing in `body.asp` you've got quite a few in there. If they instantiate COM objects (for example) do you have those components installed / registered on the server where you are deploying the site? – user692942 Mar 11 '15 at 12:21
  • Just so you know the error listed there is **not** a detailed error, that is a default that is shown when errors are not sent to the browser. Check in the `ASP` section in IIS that under `Debugging properties`, `Send Errors to Browser` is set to `True` *(This applies to IIS 7 and above)*. See [Classic ASP on IIS7: refusing to send errors to browser on 500 Internal Server Error](http://stackoverflow.com/a/6328351/692942) – user692942 Mar 11 '15 at 12:28
  • I unfortunately don't have access to IIS for the webserver. I've asked my server admin about this though so hopefully I'll hear back soon. – Connor McGill Mar 11 '15 at 13:37
  • I did wonder if this might be the case. If you do use COM components you will also have to get them to install and register them for you. – user692942 Mar 11 '15 at 14:01
  • So on the IIS server I'm running on my local machine my settings are: Application Pool: DefaultAppPool .Net Framework version: 4.0 Managed Pipeline Mode: Integrated Identity: ApplicationPoolIdentity I also made sure that ASP was installed, that parent paths are enabled and send errors to browser is true. Do you think this issue is IIS related rather than to do with my web.config file? – Connor McGill Mar 11 '15 at 14:34
  • I guess the question is do you get detailed errors *(by "detailed" I mean full error including page and line number)* displayed on your local setup? – user692942 Mar 11 '15 at 15:02
  • I do get the error message, page and line number on my local setup. – Connor McGill Mar 11 '15 at 15:21
  • That will be because you have `Send Errors to Browser` set to `True`. Guess you will have to wait for the server configuration to be updated. – user692942 Mar 11 '15 at 15:25

1 Answers1

0

So after getting IIS set up correctly on the webserver, almost everything appears to be working as intended now :)

Connor McGill
  • 259
  • 4
  • 17