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

拒绝访问。 (异常来自 HRESULT:0x80070005 (E_ACCESSDENIED))

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

异常详细信息: System.UnauthorizedAccessException: 拒绝访问。 (异常来自 HRESULT:0x80070005 (E_ACCESSDENIED))

ASP.NET 未被授权访问所请求的资源。请考虑授予 ASP.NET 请求标识访问此资源的权限。ASP.NET 有一个在应用程序没有模拟时使用的基进程标识(通常,在 IIS 5 上为 {MACHINE}\ASPNET,在 IIS 6 上为网络服务)。如果应用程序正在通过 <identity impersonate="true"/> 模拟,则标识将为匿名用户(通常为 IUSR_MACHINENAME)或经过身份验证的请求用户。

To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

源错误:


行 24:     void loadData()
行 25:     {
行 26:         News model = newDal.Search_NewsByID(id);
行 27:         if (model != null)
行 28:         {

源文件: f:\websites\shjsstcom89-c772a9\www\en\tech\tech.aspx.cs    行: 26

堆栈跟踪:


[UnauthorizedAccessException: 拒绝访问。 (异常来自 HRESULT:0x80070005 (E_ACCESSDENIED))]

[FileLoadException: 未能加载文件或程序集“System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。拒绝访问。]
   System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user) +0
   System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe() +45
   System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode() +20
   System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) +57
   System.Data.Linq.Table`1.System.Linq.IQueryProvider.Execute(Expression expression) +49
   System.Linq.Queryable.SingleOrDefault(IQueryable`1 source, Expression`1 predicate) +301
   Ireal.DAL.NewsDao.Search_NewsByID(Int32 id) in E:\柳磊\201507\君山2\201507_junshan\Ireal.DAL\NewsDao.cs:456
   _Default.loadData() in f:\websites\shjsstcom89-c772a9\www\en\tech\tech.aspx.cs:26
   _Default.Page_Load(Object sender, EventArgs e) in f:\websites\shjsstcom89-c772a9\www\en\tech\tech.aspx.cs:22
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


版本信息: Microsoft .NET Framework 版本:2.0.50727.8974; ASP.NET 版本:2.0.50727.8975