我正在开发一个库(VS 2010,针对AnyCPU的程序集),并且在逐步执行XmlValidationReader(..)
的构造函数时出现以下错误。此构造函数的参数是XmlReader()
的实例,特定的XML在语法上是正确的,并使用第三方工具进行验证。
错误:灾难性故障(HRESULT异常:0x8000FFFF (E_UNEXPECTED))
异常对象:System.Runtime.InteropServices.COMException
堆栈追踪:
System.Security.Policy.PEFileEvidenceFactory.GetLocationEvidence(SafePEFileHandle peFile,SecurityZone& zone,StringHandleOnStack retUrl)at System.Security.Policy.PEFileEvidenceFactory.GenerateLocationEvidence() 在System.Security.Policy.PEFileEvidenceFactory.GenerateEvidence(Type evidenceType)at System.Security.Policy.AssemblyEvidenceFactory.GenerateEvidence(类型 evidenceType)at System.Security.Policy.Evidence.GetHostEvidenceNoLock(Type type)at System.Security.Policy.Evidence.GetHostEvidence(Type type,Boolean markDelayEvaluatedEvidenceUsed)at System.Security.Policy.AppDomainEvidenceFactory.GenerateEvidence(类型 evidenceType)at System.Security.Policy.Evidence.GetHostEvidenceNoLock(Type type)at System.Security.Policy.Evidence.RawEvidenceEnumerator.MoveNext()at System.Security.Policy.Evidence.EvidenceEnumerator.MoveNext()at System.Configuration.ClientConfigPaths.GetEvidenceInfo(的AppDomain appDomain,String exePath,String& typeName)at System.Configuration.ClientConfigPaths.GetTypeAndHashSuffix(的AppDomain appDomain,String exePath)at System.Configuration.ClientConfigPaths..ctor(String exePath,Boolean includeUserConfig)at System.Configuration.ClientConfigPaths.GetPaths(String exePath, 布尔includeUserConfig)at System.Configuration.ClientConfigurationHost.RequireCompleteInit(IInternalConfigRecord 记录) System.Configuration.BaseConfigurationRecord.GetSectionRecursive(字符串 configKey,Boolean getLkg,Boolean checkPermission,Boolean getRuntimeObject,Boolean requestIsHere,Object&结果,对象& resultRuntimeObject)at System.Configuration.BaseConfigurationRecord.GetSection(字符串 configKey) System.Configuration.ConfigurationManager.GetSection(字符串 sectionName)at System.Xml.Schema.XmlSchemaCollection..ctor(XmlNameTable nametable)
在System.Xml.XmlValidatingReaderImpl..ctor(XmlReader reader)处 System.Xml.XmlValidatingReader..ctor(XmlReader reader)
我没有更改系统中的任何安全配置。加载程序集的特定帐户具有管理权限。知道什么可能导致这个问题吗?我已经广泛地浏览了网络,但是徒劳无功。