Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ASP page is blank

    Hi

    I am developing a system locally which works fine. Locally i am using IIS 7.5.7600.16385.

    When I upload the files to my remote server which is using IIS 7.0.6000.16386 the asp pages dont run the script and the output is just a blank white screen with no error messages!

    The same page i go to locally runs the asp script.

    I am using to access databases that are linked together.

    Here is the script for the page:

    Code:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <%
    
    'Dim cnnJudge
    'Dim rsJudge
    'Dim strSQL
    
    	strSQL2 = "SELECT ID FROM Users WHERE Username = '"&Session("MM_Username")&"';"
    
    	Set cnnJudge2 = Server.CreateObject("ADODB.Connection")
    	cnnJudge2.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("_private/pp.mdb"))
    
    	Set rsJudge2 = cnnJudge2.Execute(strSQL2)
    	
    	Session("test") = rsJudge2("ID")	
    	
    	
    	
    	strSQL = "SELECT [tbl-nominations].[nominee-first], [tbl-nominations].[nominee-last], [tbl-nominee-type].[nominee-type], [tbl-qualifications].[qualification-title] FROM [tbl-industry-sector] INNER JOIN ([tbl-qualifications] INNER JOIN ([tbl-nominee-type] INNER JOIN [tbl-nominations] ON [tbl-nominee-type].[type-id] = [tbl-nominations].[type-id]) ON [tbl-qualifications].[qualification-id] = [tbl-nominations].[qualification-id]) ON [tbl-industry-sector].[industry-id] = [tbl-qualifications].[industry-id]  WHERE [tbl-nominations].[JUDGEID] = " & Session("test") & ";"
    
    	Set cnnJudge = Server.CreateObject("ADODB.Connection")
    	cnnJudge.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("_private/pp.mdb"))
    
    	Set rsJudge = cnnJudge.Execute(strSQL)
    
    %>
    <!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">
    <head>
    <title>City &amp; Guilds</title>
    <link href="css/styles.css" type="text/css" rel="stylesheet"/>
    </head>
    <body>
    <div id="container" >
    
    <img src="img/header.jpg"/>
    
    <div id="navigation">
    	<ul>
        	<!--<li style="float:left; padding-left:7px;"><a href="#">home&nbsp;|</a></li>-->
            <li style="float:right"><a style="margin:0; padding-right:7px;" href="<%= MM_Logout %>">Logout</a></li>
            <!--<li style="float:left;"><a href="#">back&nbsp;|</a></li>
            <li style="float:left;"><a href="#">next&nbsp;|</a></li>
            <li style="float:right;"><a href="#">save &amp; continue&nbsp;|</a></li>-->
        </ul>
    </div>
    
    
    <div id="text">
    <h1>Judging home page</h1>
    <p>Welcome to the judging home page. On this page you can view our latest award news, review and score nominations and keep track of your work. </p>
    </div>
    
    <div id="news">
    <h1>News</h1>
    <p>News items will appear here.</p>
    <p>26/10/2011 - User testing <br />15/11/2011 - Expected launch date</p>
    </div>
    
    
    
    
    
    
    
    
    
    
    
    
    
    <div id="data">
    <!--<div class="candidate" style="color:#cc0000; text-align:left; font-weight:bold;">NAME</div>
    <div class="type" style="color:#cc0000; text-align:left; font-weight:bold;width:133px;">INDUSTRY</div>
    <div class="result" style="color:#cc0000; text-align:left; font-weight:bold;">TYPE</div>
    <div class="result" style="color:#cc0000; text-align:left; font-weight:bold;">OUTCOME</div>-->
    
    
    <table width="700" border="0" cellspacing="0" cellpadding="5" style="font-size:13px">
      <tr style="color:#cc0000; font-weight:bold">
        <td width="59">NAME</td>
        <td width="310">INDUSTRY</td>
        <td width="142">TYPE</td>
        <td width="102">OUTCOME</td>
        <td width="75">SCORE</td>
      </tr>
      
    
    
    <%
    Do While Not rsJudge.EOF
    %>
    
      <!--<div class="candidate" style="background-color:#f0ebeb; color:#000;"><a href="judge.2.1.asp?id=111111111111111111111111"><%=rsJudge("nominee-first")%>&nbsp;<%=rsJudge("nominee-last")%></a>
      </div>
    
      <div class="type" style="background-color:#f0ebeb; color:#000; width:200px; font-size:11px;">Advice, Guidance, Counselling and Mediation
      </div>
      
      <!--<div class="status" style="background-color:#f0ebeb; color:#000;">ss</div>
      
      <div class="result" style="background-color:#f0ebeb; color:#000;">Chief/Lead Verifier</div>
      
      <div class="type" style="background-color:#f0ebeb; color:#000;">Waiting to be judged</div>-->
      
      <a href="judge.2.1.asp?id=111111111111111111111111"><tr onmouseover="style.backgroundColor='#cc0000'; this.style.color='white'" onmouseout="style.backgroundColor='#ffF'; this.style.color='black'">
        <td><%=rsJudge("nominee-first")%>&nbsp;<%=rsJudge("nominee-last")%></td>
        <td><%=rsJudge("qualification-title")%></td>
        <td><%=rsJudge("nominee-type")%></td>
        <td>Waiting to be judged</td>
        <td>10</td>
      </tr></a>
    
    <%
      rsJudge.MoveNext
    Loop
    %>
    </table>
    </div>
    
    
    
    <div id="reference">
    <h1>Reference documents</h1>
    <p><a href="/docs/Guidelines for judges.doc" target="_blank">Full judging guidelines 2011 (Word document, 147KB)</a></p>
    <p><a href="/docs/Guidance notesV1.pdf" target="_blank">Guidance notes 2011 (PDF document, 226KB)</a></p>
    </div>
    
    <div id="help">
    <h1>Help</h1>
    <!--<div style="margin:0 auto; width:298px; text-align:center; padding-top:20px;">-->
    <P>Training guide to follow
    </div>
    
    <!--<div id="nav">
    	<div id="back"><a href="<%= MM_Logout %>">Logout</a></div>
        <div id="next"><a href="judge.2.1.asp">Next</a></div>
    </div>-->
    
    </div>
    </body>
    </html>
    <%
    	' Clean Up
    	rsJudge2.Close
    	Set rsJudge2 = Nothing
    	cnnJudge2.Close
    	Set cnnJudge2 = Nothing
    	
    	rsJudge.Close
    	Set rsJudge = Nothing
    	cnnJudge.Close
    	Set cnnJudge = Nothing
    %>
    Can anyone indicate where I have gone wrong please? Many thanks for your help!

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,664
    Thanks
    80
    Thanked 4,643 Times in 4,605 Posts
    Possibly ASP isn't enabled on that IIS 7 server? ASP is *NOT* enabled, by default, in IIS 7, so it needs to be turned on or, indeed, you won't get any ASP pages to work.

    To test, create the simplest ASP page possible. Something like this:
    Code:
    <html><body>
    It is now <%=Now()%>
    </body></html>
    If that page is blank then indeed this is your problem.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New Coder
    Join Date
    Apr 2008
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    Possibly ASP isn't enabled on that IIS 7 server? ASP is *NOT* enabled, by default, in IIS 7, so it needs to be turned on or, indeed, you won't get any ASP pages to work.

    To test, create the simplest ASP page possible. Something like this:
    Code:
    <html><body>
    It is now <%=Now()%>
    </body></html>
    If that page is blank then indeed this is your problem.
    Hi When i am able to run the page fine with a simple script - the one you just demonstrated.

    I have 3 Queries on the page when i remove the latter two the page runs. So i think its something to do with the syntax or the query with the inner join.

    Still cant get it to work remotely

  • #4
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,100
    Thanks
    2
    Thanked 23 Times in 23 Posts
    Do what Old Pedant said to do, which is create the simple ASP page he gave you in his post. If you still get a blank page, the remote server does not support ASP, or there is a problem with the way that server is setup.
    Last edited by vinyl-junkie; 11-17-2011 at 01:08 PM. Reason: Additional clarification
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #5
    New Coder
    Join Date
    Apr 2008
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by vinyl-junkie View Post
    Do what Old Pedant said to do, which is create the simple ASP page he gave you in his post. If you still get a blank page, the remote server does not support ASP, or there is a problem with the way that server is setup.
    Hi I have done this and the page does return the time and date so asp is running

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,664
    Thanks
    80
    Thanked 4,643 Times in 4,605 Posts
    There's a lot there I would change, but no, I don't see the reason for your bug.

    Maybe you need to use ON ERROR RESUME NEXT and then put error checking after ever DB operation.

    Why do you use two connections, when they both connect to the same DB?? Possibly that causes problems.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •