Site won't run

Discussion in 'C#' started by davelewicki, Jan 2, 2008.

  1. #1
    I have inherited a ASP site that I can't start.

    Here's the default.asp page:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>NAVAIR North Island e-Campus</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="styles/core.css" media="all" rel="stylesheet" type="text/css" />
    <link href="styles/print.css" media="print" rel="stylesheet" type="text/css" />
    </head>
    <body id="home">

    <div id="main">
    <div id="logo-top"><img src="gifs/navair-nicc-home.gif" width="222" height="49" alt="NAVAIR: North Island Career Curriculums" /></div>

    <div id="head">
    <ul class="horizontal" id="head-links"><li><a href="/About/">About e-Campus</a></li><li><a href="/Contact/">Contact Us</a></li><li><a href="/Help/">Help</a></li></ul>
    </div>

    <div id="banner"><img src="pngs/banner-home.png" width="750" height="61" alt="e-Campus 4.0" /></div>

    <div id="menu">
    <ul class="horizontal">
    <li><a href="/My-Curriculum/"><img src="pngs/tab-my.png" width="113" height="20" alt="My Curriculum" /></a></li>
    <li><a href="/Career-Curriculum/"><img src="pngs/tab-career.png" width="135" height="20" alt="Career Curriculum" /></a></li>
    <li><a href="/General-Refresher/"><img src="pngs/tab-refresher.png" width="135" height="20" alt="General Refresher" /></a></li>
    <li><a href="/Annual-Training/"><img src="pngs/tab-annual.png" width="190" height="20" alt="Annual Mandatory Training" /></a></li>
    <li><a href="/How-to-Use/"><img src="pngs/tab-use.png" width="92" height="20" alt="How to Use" /></a></li>
    </ul>
    </div>

    <div id="wrap-background">
    <div id="content-wrap">

    <!-- #include virtual="/includes/left-nav-featured.inc.asp" -->

    <div id="content">
    <h1>NAVAIR e-Campus</h1>
    <p>NAVAIR North Island's e-Campus provides a web-based portal for all NAVAIR North Island 4.0 personnel to identify, acquire, and manage their training and developmental activities. Through e-Campus, engineers, scientists, technicians, configuration management specialists, administrative support, and other 4.0 personnel can identify their training requirements, take web-based courses on-line, sign-up for classroom training, and plan their career progression. Supervisors can manage their employee's individual training plan and administer their Competency's training program.</p>
    <p>We believe e-Campus is laid out in an intuitive, user-friendly manner that should facilitate your navigation through all its features. If you have any questions concerning the operation of e-Campus go to <a href="/How-to-Use/">How to Use</a> above, or see your immediate Competency Manager.</p>
    </div>

    <!-- #include virtual="/includes/right-nav-staff.inc.asp" -->
    <br clear="all" />
    <div class="clearing">&nbsp;</div>
    </div>
    </div>

    <div id="footer">
    <div id="footer-text">&copy;<%= Year(Date()) %> Naval Air Systems Command</div>
    <div id="footer-links">
    <ul class="horizontal">
    <li><a href="/My-Curriculum/">My Curriculum</a></li>
    <li><a href="/General-Refresher/">General Refresher</a></li>
    <li><a href="/Career-Curriculum/">Career Curriculum</a></li>
    <li><a href="/Annual-Training/">Annual Mandatory Training</a></li>
    <li><a href="/How-to-Use/">How to Use</a></li>
    </ul>
    <ul class="horizontal" style="margin-top:5px;">
    <li><a href="/About/">About e-Campus</a></li>
    <li><a href="/Contact/">Contact Us</a></li>
    <li><a href="/Help/">Help</a></li>
    </ul>
    </div>

    <div class="clearing">&nbsp;</div>
    </div>
    </div>

    <div id="logo" style="text-align:right;"><a href="/Manager/login.asp"><img src="pngs/hat.png" width="46" height="19" alt="" title="e-Campus Manager Login" /></a></div>

    <!-- This site was lovingly handcrafted in 2005 by SiteLab International Inc.
    If you'd like to see more of our work, please go to http://www.sitelab.com
    or email info@sitelab.com or call us for information at US: 858-456-4720. -->

    <script src="scripts/external-links.js" type="text/javascript"></script>

    </body>
    </html>


    Here's the global.asa file:


    <SCRIPT LANGUAGE="VBScript" RUNAT="Server">
    SUB Application_onStart()

    ' Set Error Handling Parameters.
    Application("ERROR_HANDLING_ENABLED") = FALSE
    Application("SITE_DESCRIPTION") = "NAVAIR e-Campus Web Site"
    Application("EMAIL_DEVELOPER") = "dgray@sitelab.com"

    ' Specify the outgoing mail server.
    Application("SMTP_SERVER") = "localhost"

    ' Email address of the primary contact(s) -- for use by the contact forms.
    Application("EMAIL_PRIMARY") = "info@navair.navy.mil"

    ' Path to ASP Libraries.
    Application("LIBRARY_PATH") = Server.MapPath("\libraries\")

    ' Data Source.

    Application("SYSTEM_DSN") = "Provider=sqloledb; UID=n100;PWD=n100;Initial Catalog=NavAir"



    ' Set Site Manager Parameters.
    Application("MANAGER_SESSION_EXPIRY") = 120

    ' Set Global Parameters
    Application("EMPLOYEE_TYPE_ADMIN") = 1
    Application("EMPLOYEE_TYPE_SUPERVISOR") = 2
    Application("EMPLOYEE_TYPE_EMPLOYEE") = 3

    END SUB

    SUB Application_onEnd()

    END SUB

    SUB Session_onStart()

    END SUB

    SUB Session_onEnd()

    END SUB
    </SCRIPT>


    Any insights on why it won't run? Thanks.
     
    davelewicki, Jan 2, 2008 IP
  2. urstop

    urstop Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What is the problem. What error are you encountering.
     
    urstop, Jan 3, 2008 IP
  3. davelewicki

    davelewicki Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's bombing out on the include file: \includes\left-nav-featured.inc.asp. I cut and pasted the asp file default.asp to another file and loaded the other file into IE a little at a time. It bombed at the include file. Here's the include file - listed below...

    The error it's giving is:

    The website cannot display the page (HTTP 500)
    The website you are visiting has a server problem
    that prevents the webpage from displaying. This
    often occurs as a result of website maintenance
    or because of a programming error on interactive
    websites that use scripting.


    <!-- #include file="_left-nav-featured.asp" -->

    <div id="content-featured">

    <div id="news-element">
    <h2><%=TITLE%></h2>
    <p><%=CONTENT%><p>
    <!-- CONTENT_CODE: <%=CONTENT_CODE%> -->
    </div>

    <h2>Featured Courses</h2>
    <dl>
    <%=COURSE_LIST%>
    </dl>
    </div>

    Thanks.
     
    davelewicki, Jan 3, 2008 IP
  4. davelewicki

    davelewicki Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Here's the /includes/_left-nav-featured.asp file mentioned above:
    <%
    '*******************************************************************************
    '*
    '* Name: Left Nav Featured Column
    '* Author: Kevin Callahan
    '* Date Created: 07.25.2006
    '* Purpose: Renders the correct dynamic content for the Help page
    '*
    '* File: /includes/_left-nav-featured.asp
    '* Called By: /includes/left-nav-featured.inc.asp
    '*
    '* ============================================================================
    '*
    '* Modifications:
    '* (Date) (Author) - (Reason)
    '*
    '*******************************************************************************

    '*******************************************************************************
    ' Declare the Library Components
    '*******************************************************************************
    SET objElementString = GetObject("script:" & Application("LIBRARY_PATH") & "\SiteLab.String.wsc")
    SET objElementDatabase = GetObject("script:" & Application("LIBRARY_PATH") & "\SiteLab.Database.wsc")

    '*******************************************************************************
    ' Connect to DB
    '*******************************************************************************
    objElementDatabase.DSN = Application("SYSTEM_DSN")
    ' objElementDatabase.ShowSQL = TRUE

    '*******************************************************************************
    ' Get Input Parameters
    '*******************************************************************************

    '*******************************************************************************
    ' Set Defaults
    '*******************************************************************************
    CONTENT_CODE = "news"

    '*******************************************************************************
    ' Get News Content
    '*******************************************************************************
    if (CONTENT_CODE <> "") then

    sqlGetRecord = " SELECT " & _
    " c.Title, " & _
    " c.Code, " & _
    " c.ContentTypeID, " & _
    " c.Content, " & _
    " c.DateCreated, " & _
    " (SELECT u1.FirstName + ' ' + u1.LastName FROM Employee u1 WHERE u1.EmployeeID = c.CreatedByEmployeeID) as CreatedByEmployee, " & _
    " c.DateUpdated, " & _
    " (SELECT u2.FirstName + ' ' + u2.LastName FROM Employee u2 WHERE u2.EmployeeID = c.UpdatedByEmployeeID) as UpdatedByEmployee " & _
    " FROM " & _
    " Content c " & _
    " WHERE " & _
    " c.Code = '" & CONTENT_CODE & "'"

    SET rsRecord = objElementDatabase.RSOpen(sqlGetRecord)

    if (not rsRecord.EOF) then

    ' Get Data
    TITLE = objElementString.DBUnclean(rsRecord("Title"))
    CODE = objElementString.DBUnclean(rsRecord("Code"))
    CONTENT_TYPE_ID = rsRecord("ContentTypeID")
    CONTENT = objElementString.DBUnclean(rsRecord("Content"))

    DATE_CREATED = rsRecord("DateCreated")
    CREATED_BY_EMPLOYEE = rsRecord("CreatedByEmployee")
    DATE_UPDATED = rsRecord("DateUpdated")
    UPDATED_BY_EMPLOYEE = rsRecord("UpdatedByEmployee")

    if (CONTENT_TYPE_ID = 1) then
    CONTENT_TEXT = CONTENT
    elseif (CONTENT_TYPE_ID = 2) then
    CONTENT_HTML = CONTENT
    end if

    end if

    SET rsRecord = Nothing

    end if

    '*******************************************************************************
    ' Get Featured Courses
    '*******************************************************************************
    sqlGetCourses = " SELECT " & _
    " c.CourseID, c.CourseName, c.BriefDescription " & _
    " FROM " & _
    " Course c " & _
    " WHERE " & _
    " c.StatusID = 1 AND " & _
    " c.FeaturedFlag = 1 " & _
    " ORDER BY " & _
    " c.SortOrder "

    SET rsCourses = objElementDatabase.RSOpen(sqlGetCourses)

    do while not rsCourses.EOF

    intCourseID = rsCourses("CourseID")
    strCourseName = objElementString.HTMLClean(rsCourses("CourseName"))
    strBriefDescription = objElementString.HTMLClean(rsCourses("BriefDescription"))

    ' Build Course List
    COURSE_LIST = COURSE_LIST & "<dt><a href='/My-Curriculum/course.asp?txtCourseID=" & intCourseID & "'>" & strCourseName & "</a></dt>" & vbCRLF
    COURSE_LIST = COURSE_LIST & "<dd>" & strBriefDescription & "</dd>" & vbCRLF

    rsCourses.MoveNext

    loop
    SET rsCourses = Nothing


    '*******************************************************************************
    ' UnDeclare the Library Components
    '*******************************************************************************
    SET objElementString = Nothing
    SET objElementDatabase = Nothing
    %>
     
    davelewicki, Jan 3, 2008 IP
  5. urstop

    urstop Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The first couple of lines in your include file show that you are using some libraries from SiteLab. Did you make sure that these libraries are properly installed on the server where you are trying to configure your asp application.
     
    urstop, Jan 7, 2008 IP