XML解析错误:找不到元素? [英] XML Parsing Error: no element found?

查看:75
本文介绍了XML解析错误:找不到元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对IIS和ASP.Net有疑问.

I have a question about IIS and ASP.Net.

我已迁移到新服务器,必须运行一个上载/下载应用程序".该应用程序在旧服务器上运行良好,现在我遇到了一些解析错误,我无法理解它的来龙去脉.当我尝试下载一些文件时也可以使用,也可以连接并且登录系统也可以使用.但是如果我尝试上传一些文件,则会出现此解析错误.起初,我以为一定是一些权限问题,但是在添加一些用户权限之后,这没有任何意义.

I migrated to a new server, in wich I have to run an Upload/Download Application. This application was running good in an old server, now I´m getting some parsing error, that I don´t get it where it comes. It works when I try to donwload some files, also I have a connection and the login system works.But if I try to upload some files, then come this parsing error. At the beginning I was thinking it have to be some permissions issues, but after I added some user privileges it doesn´t make some sense.

XML解析错误:

找不到元素位置: http://www.mywebsite.com/DownloadManager/DMUpload.aspx?folderId=22767&guid=271334658&cancel=1 行号1,第1列:

这是我的upload.aspx文件:

And this is my upload.aspx file:

<%@ 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>

我真的不明白,为什么它不起作用.

I really don´t get, why it doesn´t work.

aspx上载必须将文件发送到一个名为uploads的临时文件夹中,并且在文件上载之后,必须将其发送到一个oder文件夹中,该文件夹取决于用户权限.我注意到文件已上传并仅保存在临时文件夹中,但是随后什么也没发生,我收到了解析错误,就像我说的那样.

The aspx upload have to send the file in to a temporary folder called uploads and after the file is uploaded, it have to be sended in to an oder folder wich is reserved depending of the user permissions. I noticed that the file is uploaded and save it just in the temporary folder, but then it nothing happends and I recive, like I say, a parsing error.

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

I don't know what could be the problem, I really need some help here.

还有一件额外的事情,如果我尝试在localhost下运行应用程序,那么我只会得到网站的主页.

Just an extra thing, if I try to run the aplication under localhost, i get nothing just the Homepage of the website.

推荐答案

似乎是出于以下原因.

应用程序所在的文件夹在只读模式下没有所有人"组.添加所有人"后,效果很好!

请检查文章以获取更多详细信息.

please check article for more details.

http://forums.asp.net/t/1004395.aspx?是什么原因导致此+ XML + Parsing + Error + no + element + found

查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆