SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Learning... tahirjadoon's Avatar
    Join Date
    Jan 2003
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    The connection to the server was reset while the page was loading

    I am working on my local machine and i am getting this error while uploading a file:

    The connection was reset
    The connection to the server was reset while the page was loading.

    * The site could be temporarily unavailable or too busy. Try again in a few
    moments.
    * If you are unable to load any pages, check your computer's network
    connection.
    * If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.

    here is my upload page:

    Code:
    <script language="javascript" tyep="text/javascript">
    <!--
     
     function CheckPDF(strFile){
      var regPDF = /.pdf/;
      var objRegExp = new RegExp(regPDF);
       //check if string matches pattern
       return objRegExp.test(strFile);
     }
     
     function showMsg() {
      var strFile = ''+document.frmUpload.file.value;
         if (strFile == "" || strFile == null){ 
               alert("- You have not selected a file.  Click on the browse button to select your file.");
          return false;
         }
         else if(!CheckPDF(strFile)){
          alert("- Only PDF file types are allowed.  Click on the browse button to select your PDF file.");
          return false;
         }
         else{
          window.document.frmUpload.btnSubmit.disabled = true;
                window.document.frmUpload.btnReset.disabled = true;
          return true;
         }
     } 
     
    //-->
    </script>
    <body>
     <div id="divPage"><!-- Page container starts-->
      <!--#include virtual="/videoprospect/Includes/HeaderFooter/Admin/Header.asp" -->
      <div id="divAdminContent"><!-- Content container starts-->
     
        <form name="frmUpload" enctype="multipart/form-data" action="UploadEventPDF_proc.asp?EventId=<%=nEventId%>" method="post" onsubmit="return showMsg();">
     
         <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
     
                <tr>
                  <td width="15%"><b>PDF File</b></td>
                  <td width="85%"><input type="file" name="file" size="57"></td>
                </tr>
                <tr>
                  <td width="15%">&nbsp;</td>
                  <td width="85%"><input type="submit" value="Submit" name="btnSubmit" class="button1">&nbsp;
                           <input type="reset" value="Reset" name="btnReset" class="button1"></td>
                </tr>
             </table>
        </form>
     
      </div><!-- Content container ends-->
      <!--#include virtual="/videoprospect/Includes/HeaderFooter/Admin/Footer.asp" -->
     </div><!-- Page container ends-->
     
    </body>
    Here is my process page, i am not calling my upload methods at the moment, only getting the event id.
    Code:
    <%@ Language=VBScript %>
    <%
    Option Explicit
    %>
    <%
    Dim cErr, nEventId, strToURL
     
    cErr   = ""
    strToURL = "index.asp"
    nEventId  = Request.QueryString("EventId")
    If Not isNumeric(nEventId) Then nEventId = 0
     
    Response.Redirect strToURL & "?err=" & cErr
    %>
    The beauty of life is not dependent on how happy you are,
    but on how happy others can be because of you...

  2. #2
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there any ASP code in the Header and Footer files?

  3. #3
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, what does "index.asp" do? Is it just a static page? Are there any redirects in it?

  4. #4
    Learning... tahirjadoon's Avatar
    Join Date
    Jan 2003
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    index.asp is the starting point for the events. This lists all the events that are created by the user. Following actions are for each event are on this page: edit/delete/delete PDF/upload pdf/view pdf.

    HEader and footer files have asp code, footer has the copy right year dynemically created and header has client side code for the mouse over on the menu item (buttons).

    Problem is, another project doing the same thing is working on my machine and that has a lot of asp code.

    this is very simple check the process page code, i have checked it without redirect to index page also; same error. Its not the index page its at the process page.

    Using FrontPage 2000 and OS is XP Prof SP2.
    The beauty of life is not dependent on how happy you are,
    but on how happy others can be because of you...

  5. #5
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just tired the same code on my XP Pro SP2 box and it seemed to work fine. (Other than giving me a '404 not found' for index.asp). The only modification I made was to delete the includes, which I did not have. Have you tried getting rid of the includes and the response.redirect temporarily to see if it some funky code in those 3 files that might be causing the error?

  6. #6
    Learning... tahirjadoon's Avatar
    Join Date
    Jan 2003
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not redirecting to index.asp page any more...

    You mean i should remove the include files from my upload page?

    the upload process page i have only this code and i am still getting the same error:

    Code:
    <&#37;@ Language=VBScript %>
    <%
    Option Explicit
    %>
    <%
    Dim cErr, nEventId, strToURL
     
    cErr   = ""
    strToURL = "index.asp"
    nEventId  = Request.QueryString("EventId")
    If Not isNumeric(nEventId) Then nEventId = 0
     %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html>
    <head>
    <title>Upload Process Page</title>
    </head>
    <body>
     <strong>Upload Process Page</strong>
    </bod>
    </html>
    The beauty of life is not dependent on how happy you are,
    but on how happy others can be because of you...

  7. #7
    Learning... tahirjadoon's Avatar
    Join Date
    Jan 2003
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uploaded the file to the server and checked there, its working just fine. Now i have to figure out why my local machine is not working.
    The beauty of life is not dependent on how happy you are,
    but on how happy others can be because of you...


Bookmarks

Posting Permissions

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