说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Xml.XmlException: 缺少根元素。源错误: 
[没有相关的源行]
 源文件: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a840fbda\97b8902a\App_Web_2c_wd-pi.6.cs    行: 0 堆栈跟踪: 
[XmlException: 缺少根元素。]
   System.Xml.XmlTextReaderImpl.Throw(Exception e) +76
   System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res) +61
   System.Xml.XmlTextReaderImpl.ParseDocumentContent() +3979352
   System.Xml.XmlTextReaderImpl.Read() +151
   System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +112
   System.Xml.XmlDocument.Load(XmlReader reader) +108
   System.Xml.XmlDocument.Load(String filename) +87
   Zhiyuan.Web.CN.admin.code.GeneralConfigFileManager.ReviseConfig() +165
   Zhiyuan.Web.CN.admin.code.GeneralConfigFileManager..cctor() +240[TypeInitializationException: “Zhiyuan.Web.CN.admin.code.GeneralConfigFileManager”的类型初始值设定项引发异常。]
   Zhiyuan.Web.CN.admin.code.GeneralConfigFileManager.LoadConfig() +0
   Zhiyuan.Web.CN.admin.code.GeneralConfig..cctor() +108[TypeInitializationException: “Zhiyuan.Web.CN.admin.code.GeneralConfig”的类型初始值设定项引发异常。]
   Zhiyuan.Web.CN.admin.code.GeneralConfig.ResetConfig() +0
   Zhiyuan.Web.CN.Parentpage..ctor() +177
   Zhiyuan.Web.CN.shownews..ctor() +108
   ASP.shownews_aspx..ctor() in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a840fbda\97b8902a\App_Web_2c_wd-pi.6.cs:0[TargetInvocationException: 调用的目标发生了异常。]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
   System.Web.UI.PageParser.GetCompiledPageInstance(VirtualPath virtualPath, String inputFile, HttpContext context) +224
   System.Web.UI.PageParser.GetCompiledPageInstance(String virtualPath, String inputFile, HttpContext context) +121
   URLRewriter.RewriterFactoryHandler.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +675
   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +193
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155 

解决方案 »

  1.   

    xml文档 缺少根元素。 ,格式不正确
      

  2.   

    以前都好的,就昨天突然这样了
    我在网上找的资料:1.xml有问题。2.缓存里的xml有问题
    整个程序就一个编辑器用到了xml,而且我也用没发生错误的编辑器替换过了,缓存里的xml删不掉。
    在IIS里把网站删掉,在建个能不能解决?
      

  3.   

    应该是xml文件的结构问题,我也遇到过
      

  4.   

    可是我整个网站就一个编辑器用到xml,而且编辑器是在后台。后台能进去,就是首页进不去。
    [没有相关的源行] 源文件: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a840fbda\97b8902a\App_Web_2c_wd-pi.6.cs    行: 0 
      

  5.   

    如果方便的话,把xml文件贴上来看看
      

  6.   

    编辑器是fckeditor
    这个是下过来的,其他网站用着都是好好的
    除了编辑器文件夹里有3个xml文件(超过10000字符传不上来囧) 其他的文件夹我都找过了没发现xml文件
      

  7.   

    是xml文件的结构问题,昨天我还遇到了