2013-03-05 166 views
0

我有一个关于IIS和ASP.Net的问题。XML解析错误:找不到元素?

我迁移到一个新的服务器,我必须运行上传/下载应用程序。这个应用程序在旧服务器上运行良好,现在我得到了一些解析错误,我不明白它在哪里。 它工作时,我试图donwload一些文件,我也有一个连接和登录系统works.But如果我尝试上传一些文件,然后来这个解析错误。一开始我认为它必须是一些权限问题,但是在我添加了一些用户权限之后,这并没有什么意义。

XML解析错误:

no element found Location: http://www.mywebsite.com/DownloadManager/DMUpload.aspx?folderId=22767&guid=271334658&cancel=1 Line Number 1, Column 1:

这是我upload.aspx文件:

<%@ Page language="c#" Codebehind="DMUpload.aspx.cs" AutoEventWireup="false" Inherits="DownloadManager.DMUpload" EnableSessionState="ReadOnly"%> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<HTML> 
    <HEAD> 
     <title>DMUpload</title> 
     <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> 
     <meta content="C#" name="CODE_LANGUAGE"> 
     <meta content="JavaScript" name="vs_defaultClientScript"> 
     <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> 
     <LINK href="StyleSheet.css" type="text/css" rel="stylesheet"> 
    </HEAD> 
    <body MS_POSITIONING="GridLayout"> 
     <form id="Form1" onsubmit="uploadpop(this);" method="post" encType="multipart/form-data" 
      runat="server"> 
      <TABLE class="navigation" id="tbNavigation" cellSpacing="0" cellPadding="0" width="100%" 
       border="0"> 
       <TR> 
        <TD align="right"><asp:panel id="Panel4" runat="server" CssClass="panelButtons" Width="800px"> 
<asp:button id=btSave tabIndex=3 runat="server" CssClass="butt" Text="Speichern"></asp:button> 
<asp:button id=btBack tabIndex=3 runat="server" CssClass="butt" Text="Zurück"></asp:button> 
<asp:button id=btLogout tabIndex=3 runat="server" CssClass="butt" Text="Logout"></asp:button> 
         </asp:panel></TD> 
       </TR> 
       <tr> 
        <TD align="left"><asp:panel id="Panel1" runat="server" CssClass="panelBreadcrumb"></asp:panel><asp:label id="lbBreadCrumb" runat="server" Font-Bold="True"></asp:label></TD> 
       </tr> 
      </TABLE> 
      &nbsp; 
      <asp:label id="lbWarten" style="Z-INDEX: 103; LEFT: 24px; POSITION: absolute; TOP: 248px" runat="server" 
       Height="40px" ForeColor="Red" Font-Size="Medium" Width="536px">bitte warten...</asp:label><asp:panel id="panelUpload" style="Z-INDEX: 104; LEFT: 24px; POSITION: absolute; TOP: 96px" 
       runat="server" Height="104px" Width="528px"> 
<asp:label id=Label1 runat="server" Width="304px">Dateiauswahl:</asp:label><INPUT 
id=uploadFile1 style="WIDTH: 536px; HEIGHT: 22px" type=file size=70 
runat="server"> <INPUT id=uploadFile2 style="WIDTH: 536px; HEIGHT: 22px" 
type=file size=70 runat="server"> <INPUT id=uploadFile3 
style="WIDTH: 536px; HEIGHT: 22px" type=file size=70 runat="server"> <INPUT 
id=uploadFile4 style="WIDTH: 536px; HEIGHT: 22px" type=file size=70 
runat="server"> <INPUT id=uploadFile5 style="WIDTH: 536px; HEIGHT: 22px" 
type=file size=70 runat="server"> 
      </asp:panel></form> 
     <script language="javascript"> 

      document.getElementById("lbWarten").style.visibility = "hidden"; 

      function uploadpop(inForm) 
      { 
       document.getElementById("lbWarten").style.visibility = "visible"; 

       if(inForm.uploadFile1 != null) 
       { 
        if( inForm.uploadFile1.value !="" 
         || inForm.uploadFile2.value !="" 
         || inForm.uploadFile3.value !="" 
         || inForm.uploadFile4.value !="" 
         || inForm.uploadFile5.value !="") 
        { 
         strUniqueID = Math.floor(Math.random() * 1000000) * ((new Date()).getTime() % 1000);     
         thePos = inForm.action.indexOf("?"); 
/* 
         if (thePos >= 0) 
          inForm.action = inForm.action.substring(0, thePos); 
         inForm.action += "?guid=" + strUniqueID + "&cancel=1"; 
*/ 
         if (thePos >= 0) 
          inForm.action += "&guid=" + strUniqueID + "&cancel=1"; 
         else 
          inForm.action += "?guid=" + strUniqueID + "&cancel=1"; 

         window.open("DMProgressBar.aspx?guid=" + strUniqueID,"","toolbar=0,scrollbars=0,location=0,status=0,menubar=0,resizable=0,height=275,width=600,top=70,left=100"); 
        } 
       }    
       inForm.submit(); 
       return true; 
      } 

      function ClearInput() 
      { 
       node = document.getElementById("panelUpload"); 
       if(node != null) 
       { 
//     node.removeNode(true); 
        node.parentNode.removeChild(node); 
       } 
       return true; 
      } 

     </script> 
    </body> 
</HTML> 

我真的鸵鸟政策得到,为什么它doesn't工作。

aspx上传必须将文件发送到一个名为uploads的临时文件夹中,文件上传后必须发送到oder文件夹,这取决于用户的权限。我注意到文件被上传并保存在临时文件夹中,但是它没有任何事情发生,并且我像我说的那样收回了解析错误。

我不知道可能是什么问题,我真的需要一些帮助。

只是一件额外的事情,如果我尝试运行本地主机下的应用程序,我什么都不会只是网站的主页。

+0

嗯,我已经修复它。我认为这是一个有约束力的问题,我只写了一个本地主机IP地址,并开始像魅力一样工作! – 2013-03-05 15:05:40

+0

我正面临类似的问题。什么对你有用?你在地址栏中写的IP地址而不是localhost是你的意思? – AkshayJ 2015-08-04 04:49:29

回答