zoukankan      html  css  js  c++  java
  • XML 解析未组织好

    I use visual studio 2005 and iis to develope a new .net website. I promise the code is right, but most pages running in Firefox 2.0 reported this error:

    XML解析错误:未组织好 位置:http://localhost/Lanxum/dTeam.aspx 行:1,列:2<%@ page language="C#" masterpagefile="~/MasterPage.master" autoeventwireup="true" inherits="dTeam, App_Web_hkuu-y0n" title="Untitled Page" theme="iAffron" stylesheettheme="iAffron" %> -^

    And in IE, error reported as below:

    无法显示 XML 页。字符开头。

    处理资源 'http://localhost/Lanxum/default.aspx' 时出错。

    第 1 行,位置: 2

    The reason is that I install visual studio first(together with .net framework 2.0) and then install IIS. It made .net FK didn't register in IIS. Just run this command with DOS:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

    Once if you have install .net FK and IIS correctly, this sentence will follow:

    开始安装 ASP.NET <v2.0.50727>。

    .........................................

    ASP.NET<v2.0.50727> 安装完毕

    Then refresh the page, you will find that the problem is fixed.

    /***********************************************/

    //zcg

    /***********************************************/

    这个原因主要是我们安装VS的顺序搞错了,

    在安装VS的时候,.NET的framwork的ASP.NET需要用到IIS,因此需要将IIS注册到APS.ENT上面,如果这个时候我们还没有安装IIS,那么IIS的注册就会失败。这样即使我们后来

    安装了IIS,用IIS来管理Web站点,还是会出错的。

    因此在安装VS的时候,一定要保证IIS已经安装到当前的计算机上面了。

    如果由于我们的疏忽,安装顺序搞混了,即出现上面的情况,我么仅仅需要重将IIS注册到.NET(VS)里面就可以了。

    操作步骤:

    进入DOS环境下

    输入 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

    然后当出现下面的文字后表示IIS注册成功。

    开始安装 ASP.NET <v2.0.50727>。

    .........................................

    ASP.NET<v2.0.50727> 安装完毕

    然后我们在IIS下,选中Web站点的属性,然后进入ASP.NET 页签,选择相应的.NET Framwork,然后单击确定。

    到此我们重新刷新网页,就可以浏览我们的页面了。

    如果还是出现问题,这个应该是缓存的问题,进入任务管理器里面找 apsnet_ws.ex 进行,然后干掉他。这个就是IIS的缓存进程。

    然后在重新启动IIS服务,进入:DOS环境下:输入   iisreset  /restart 然后回车即可。

    然后在浏览,就可以重新浏览页面了。

  • 相关阅读:
    例行更新,防止被踢
    C语言 遍历磁盘目录
    析构函数的调用
    数组学习笔记
    函数学习笔记
    c++语言 纯虚函数的使用
    c++语言 内联方法
    复制构造函数
    c++语言 覆盖成员函数
    面向对象程序设计
  • 原文地址:https://www.cnblogs.com/xingchen/p/2166073.html
Copyright © 2011-2022 走看看