日期:2014-05-16  浏览次数:24123 次

IIS 打开自建ASP网站目录错误
“/asp”应用程序中的服务器错误。
--------------------------------------------

未能找到路径“D:\小旋风AspWebServer\wwwroot\ATA1班-ASP.NET实验题目3\ATA1班-ASP.NET实验题目3\App_Data\bikes.ads”的一部分。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.IO.DirectoryNotFoundException: 未能找到路径“D:\小旋风AspWebServer\wwwroot\ATA1班-ASP.NET实验题目3\ATA1班-ASP.NET实验题目3\App_Data\bikes.ads”的一部分。

源错误: 

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  

堆栈跟踪: 


[DirectoryNotFoundException: 未能找到路径“D:\小旋风AspWebServer\wwwroot\ATA1班-ASP.NET实验题目3\ATA1班-ASP.NET实验题目3\App_Data\bikes.ads”的一部分。]
  System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2001792
  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) +998
  System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +114
  System.Web.UI.Control.OpenFileAndGetDependency(VirtualPath virtualPath, String physicalPath, CacheDependency& dependency) +102
  System.Web.UI.WebControls.XmlDataSource.GetReader(String path, String content, CacheDependency& cacheDependency) +224
  System.Web.UI.WebControls.XmlDataSource.PopulateXmlDocument(XmlDocument document, CacheDependency& dataCacheDependency, CacheDependency& transformCacheDependency) +288
  System.Web.UI.WebControls.XmlDataSource.GetXmlDocument() +154
  System.Web.UI.WebControls.XmlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +24
  System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
  System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
  System.Web.UI.WebControls.AdRotator.PerformSelect() +60
  System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
  System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
  System.Web.UI.WebControls.AdRotator.OnPreRender(EventArgs e) +30
  System.Web.UI.Control.PreRenderRecursiveInternal() +77
  System.Web.UI.Control.PreRenderRecursiveInternal() +161
  System.Web.UI.Control.PreRenderRecursiveInternal() +161
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

 
===============================================================
求解谢谢

------解决方案--------------------
你看这个D:\小旋风AspWebServer\wwwroot\ATA1班-ASP.NET实验题目3\ATA1班-ASP.NET实验题目3\App_Data\bikes.ads 的路径对不对。
------解决方案--------------------
这种错误一般是由于目录权限设置造成的。要添加相关用户,设置为完全控制。
------解决方案--------------------
估计是目录设置不正确
------解决方案--------------------
异常详细信息: System.IO.DirectoryNotFoundException: 未能找到路径“D:\小旋风AspWebServer\wwwroot\ATA1班-ASP.NET实验题目3\ATA1班-ASP.NET实验题目3\App_Data\bikes.ads”的一部分。

检查Web站点指向的目录,IIS版本6以下要注意虚拟目录的问题