我收到一条似乎与权限相关的错误消息。我无法锻炼哪个文件需要更改权限。我也很好奇的是为什么错误是在寻找这样的路径
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs
它是否试图在其他地方调用外部库?
任何帮助都会很棒
“/”应用程序中的服务器错误。
访问被拒绝。(来自 HRESULT 的异常:0x80070005 (E_ACCESSDENIED))
说明:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
异常详细信息:System.UnauthorizedAccessException:访问被拒绝。(来自 HRESULT 的异常:0x80070005 (E_ACCESSDENIED))
ASP.NET 无权访问请求的资源。考虑向 ASP.NET 请求标识授予对资源的访问权限。ASP.NET 有一个基本进程标识(通常是 IIS 5 上的 {MACHINE}\ASPNET 或 IIS 6 和 IIS 7 上的网络服务,以及 IIS 7.5 上配置的应用程序池标识),如果应用程序不是模拟的,则使用该标识。如果应用程序通过 模拟,则身份将是匿名用户(通常是 IUSR_MACHINENAME)或经过身份验证的请求用户。
要授予 ASP.NET 对文件的访问权限,请在资源管理器中右键单击该文件,选择“属性”并选择“安全”选项卡。单击“添加”以添加相应的用户或组。突出显示 ASP.NET 帐户,然后选中所需访问权限的复选框。
源错误:
在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。
堆栈跟踪:
[UnauthorizedAccessException:访问被拒绝。(来自 HRESULT 的异常:0x80070005 (E_ACCESSDENIED))]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) +49
System.Data.SqlServerCe。 UnmanagedLibraryHelper..ctor(字符串文件名)+76
System.Data.SqlServerCe.NativeMethodsHelper..ctor(字符串模块路径)+27
System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(字符串模块路径)+281
System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder (字符串私有安装)+76
System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries() +225 System.Data.SqlServerCe.SqlCeCommand..ctor() +65[TargetInvocationException: 调用目标抛出异常。]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241 System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(类型类型)+8
NHibernate.Driver.ReflectionBasedDriver.CreateCommand() +28 NHibernate.Driver.SqlServerCeDriver.Configure(IDictionary 2 settings) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Providers\SqlCeDataServicesProvider.cs:77 NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 设置)+1582 settings) +99
Orchard.Data.Providers.OrchardSqlServerCeDriver.Configure(IDictionary[HibernateException:无法从 Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver、Orchard.Framework、Version=1.0.20.0、Culture=neutral、PublicKeyToken=null 创建驱动程序。] NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary 2 设置) +86 NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary 2 属性)+953
2 settings) +241
NHibernate.Connection.ConnectionProvider.Configure(IDictionary2 settings) +351
NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary
NHibernate.Cfg.Configuration.BuildSettings() +17 NHibernate.Cfg.Configuration.BuildSessionFactory() +44 Orchard.Data.SessionFactoryHolder.BuildSessionFactory() 在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data \SessionFactoryHolder.cs:74 Orchard.Data.SessionFactoryHolder.GetSessionFactory() 在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\SessionFactoryHolder.cs:52 Orchard.Data.SessionLocator.For(类型 entityType ) 在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\SessionLocator.cs:29 Orchard.Data.Repository1.get_Session() in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:26 Orchard.Data.Repository
1.get_Table() 在 d:\TeamCity\Projects\Orchard-1.x\ src\Orchard\Data\Repository.cs:30 Orchard.Data.Repository1.Fetch(Expression
1 谓词)在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:126 Orchard.Data.Repository1.Get(Expression
1 个谓词)在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:91 Orchard.Data.Repository1.Orchard.Data.IRepository<T>.Get(Expression
1 谓词)在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:60 Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord() 在 d:\TeamCity\Projects\Orchard -1.x\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:52 Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor() 在 d:\TeamCity\Projects\Orchard-1.x\src \Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:25 Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings 设置)在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\ShellBuilders \ShellContextFactory.cs:66 Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings 设置) 在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:128 Orchard。d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:100 System.Linq.WhereSelectArrayIterator 中的 Environment.DefaultOrchardHost.b__1(ShellSettings 设置)2.MoveNext() +85 System.Linq.Buffer
1..ctor(IEnumerable 1 源) +78 Orchard.Environment.DefaultOrchardHost.BuildCurrent() in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:87 Orchard.Environment.DefaultOrchardHost .Orchard.Environment.IOrchardHost.Initialize() 在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:56 Orchard.Web.MvcApplication.Application_Start() 在 d:\TeamCity\项目\Orchard-1.x\src\Orchard.Web\Global.asax.cs:221 source) +217
System.Linq.Enumerable.ToArray(IEnumerable[HttpException (0x80004005): 无法从 Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver、Orchard.Framework、Version=1.0.20.0、Culture=neutral、PublicKeyToken=null 创建驱动程序。] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext上下文,HttpApplication 应用程序)+9028953 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext,HttpContext 上下文,MethodInfo[] 处理程序)+131
System.Web.HttpApplication.InitSpecial(HttpApplicationState 状态,MethodInfo[] 处理程序,IntPtr appContext,HttpContext 上下文) +194 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253[HttpException (0x80004005): 无法从 Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver、Orchard.Framework、Version=1.0.20.0、Culture=neutral、PublicKeyToken=null 创建驱动程序。] System.Web.HttpRuntime.FirstRequestInit(HttpContext上下文)+8950644
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext 上下文)+97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest WR,HttpContext 上下文)+256版本信息:Microsoft .NET Framework 版本:4.0.30319;ASP.NET 版本:4.0.30319.1