Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Upload Image Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Upload Image Problem

 Post Reply Post Reply
Author
pilotcox View Drop Down
Newbie
Newbie


Joined: 03 October 2003
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote pilotcox Quote  Post ReplyReply Direct Link To This Post Topic: Upload Image Problem
    Posted: 03 October 2003 at 9:51am

I am using ASP Simple Upload and everytime I try to upload a Picture it gives me an HTTP 500 - Internal server error, the file is uploaded fine to the upload directory, I have used a different ASP simple upload and it worked fine, here is the souce code of the error page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>

<head>
<style>
a:link   {font:8pt/11pt verdana; color:red}
a:visited  {font:8pt/11pt verdana; color:#4e4e4e}
</style>
<meta HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
<title>HTTP 500 Internal server error</title>
</head>
<script>

function Related(){
 userURL=document.location.href;

 //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
 //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.

 BeginURL=userURL.indexOf("#",1) + 1;
 CurrentURL=userURL.substring(BeginURL,DocURL.length);
 
 //Build the query
 RelatedServiceURL="http://related.msn.com/related.asp?url=";
 
 //Perform simple check for Intranet URLs
 //this is where the http or https will be, as found by searching for :// but skip res:
 protocolIndex=userURL.indexOf("://",4);
 serverIndex=userURL.indexOf("/",protocolIndex + 3);
 urlresult=userURL.substring(0,serverIndex);
 if (protocolIndex - BeginURL > 7)
  urlresult=""
 
 //Check if Intranet URL - then open search bar
 
 if (urlresult.indexOf(".",0) < 1) userURL="Intranet URL";
 finalURL = RelatedServiceURL + encodeURIComponent(userURL);
 window.open(finalURL, "_search");
 
}

function Homepage(){

// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm

 //For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/ba r.htm"
 DocURL=document.location.href;
 
 //this is where the http or https will be, as found by searching for :// but skipping the res://
 protocolIndex=DocURL.indexOf("://",4);
 
 //this finds the ending slash for the domain server
 serverIndex=DocURL.indexOf("/",protocolIndex + 3);

 //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
 //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
 //urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
 BeginURL=DocURL.indexOf("#",1) + 1;
 urlresult=DocURL.substring(BeginURL,serverIndex);
  
 //for display, we need to skip after http://, and go to the next slash
 displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);

 // Security precaution: must filter out "urlResult" and "displayresult"
 forbiddenChars = new RegExp("[<>\'\"]", "g"); // Global search/replace
 urlresult = urlresult.replace(forbiddenChars, "");
 displayresult = displayresult.replace(forbiddenChars, "");

 document.write('<A target=_top HREF="' + urlresult + '">' + displayresult + "</a>");
}
function doSearch()
{
    saOC.NavigateToDefaultSearch();
}

function initPage()
{
    document.body.insertAdjacentHTML("afterBegin","<object id=saOC CLASSID='clsid:B45FF030-4447-11D2-85DE-00C04FA35C89' HEIGHT=0 width=0></object>");
}

</script>


<body bgcolor="white" onload="initPage()">

<table width="400" cellpadding="3" cellspacing="5">
  <tr>
    <td id="tableProps" valign="top" align="left"><img id="pagerrorImg" SRC="pagerror.gif"
    width="25" height="33"></td>
    <td id="tableProps2" align="left" valign="middle" width="360"><h1 id="errortype"
    style="COLOR: black; FONT: 13pt/15pt verdana"><span id="errorText">The page cannot be displayed</span></h1>
    </td>
  </tr>
  <tr>
    <td id="tablePropsWidth" width="400" colspan="2"><font
    style="COLOR: black; FONT: 8pt/11pt verdana">There is a problem with the page you are
    trying to reach and it cannot be displayed.</font></td>
  </tr>
  <tr>
    <td id="tablePropsWidth" width="400" colspan="2"><font id="LID1"
    style="COLOR: black; FONT: 8pt/11pt verdana"><hr color="#C0C0C0" noshade>
    <p id="LID2">Please try the following:</p><ul>
      <li id="instructionsText1">Open the <script> Homepage();</script> home page, and then look for links to
        the information you want. </li>
      <li id="instructionsText2">Click the
      <a xhref="javascript:location.reload()" target="_self">
      <img border=0 src="refresh.gif" width="13" height="16"
        alt="refresh.gif (82 bytes)" align="middle"></a> <a xhref="javascript:location.reload()" target="_self">Refresh</a> button, or try again later.<br>
      </li>
      <li ID="instructionsText3">Click <a href="javascript:doSearch()"><img border=0 src="search.gif" width="16" height="16" alt="search.gif (114 bytes)" align="center"> Search</a> to look for information on the Internet. </li>
      <li id="instructionsText4">You can also see <a onclick="Related();event.returnValue=false" href="">a list of related sites.</a>    
</ul>
</p>
 
    <p><br>
    </p>
    <h2 id="ietext" style="font:8pt/11pt verdana; color:black">HTTP 500 - Internal server
    error <br>
    Internet Explorer </h2>
    </font></td>
  </tr>
</table>
</body>
</html>

Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2003 at 5:55pm
Turn off IE friendly error messages and post the exact error that you're getting..... don't post the source of the error page, just the error as it's much easier to read.
FeRnAN
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.