新建一个“Handler.ashx”文件,输出"" 时,context.Response.ContentType 设置为 "text/plain" 或 "text/html" 都是一样的
firefox 下会报“XML解析错误:未找到元素"
IE 下面不会报错。

解决方案 »

  1.   

    看看你的xml
                    ?
      

  2.   


    输出的不是"xml"文件 , 只是在firefox下报错而以新建一个"Handler.ashx"文件,把里面的
    "    public void ProcessRequest (HttpContext context) {
            context.Response.ContentType = "text/plain";
            context.Response.Write("Hello World");
        }"改成
    "
        public void ProcessRequest (HttpContext context) {
            context.Response.ContentType = "text/plain";
            context.Response.Write("");
        }
    "
    就可以测试了,只在firefox下报错