“/s”应用程序中的服务器错误。

未能找到路径“F:\Web\NewSubWeb\subweb\Xml\NewAD\ADChannel.xml”的一部分。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.IO.DirectoryNotFoundException: 未能找到路径“F:\Web\NewSubWeb\subweb\Xml\NewAD\ADChannel.xml”的一部分。

源错误:


行 216:        XmlDocument xmldoc = new XmlDocument();
行 217:        ADType = "02";
行 218:        PositionPath = Subsite.CommonLibrary.Common.changPosition(channelId, ADType, this.Page);
行 219:        xmldoc.Load(Server.MapPath(ConfigurationManager.AppSettings["NewADUrl"].ToString() + PositionPath + ".xml"));
行 220:        XmlNodeList nodeList = xmldoc.SelectNodes("root/position/PositionID");

源文件: f:\Web\SubsiteV3\News\NewsSee.aspx.cs    行: 218

堆栈跟踪:


[DirectoryNotFoundException: 未能找到路径“F:\Web\NewSubWeb\subweb\Xml\NewAD\ADChannel.xml”的一部分。]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +273
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +1322
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) +132
   System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) +122
   System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) +89
   System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) +74
   System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) +0
   System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) +112
   System.Xml.XmlTextReaderImpl.OpenUrl() +426
   System.Xml.XmlTextReaderImpl.Read() +304
   System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +160
   System.Xml.XmlDocument.Load(XmlReader reader) +135
   System.Xml.XmlDocument.Load(String filename) +147
   Subsite.CommonLibrary.Common.changPosition(String channelId, String ADType, Page page) in E:\Web\分站V3\代码\CommonLibrary\Common.cs:945
   News_NewsSee.ADPath(String channelId) in f:\Web\SubsiteV3\News\NewsSee.aspx.cs:218
   News_NewsSee.Page_Load(Object sender, EventArgs e) in f:\Web\SubsiteV3\News\NewsSee.aspx.cs:90
   System.Web.UI.Control.OnLoad(EventArgs e) +109
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.6.1586.0