为什么我的 Orchard 安装正在寻找 d:\TeamCity\Projects\Orchard-1.x\....?

发布于 2024-10-18 09:21:11 字数 7199 浏览 2 评论 0 原文

我收到一条似乎与权限相关的错误消息。我无法确定哪个文件需要更改权限。我还很好奇的是为什么错误会查看类似的路径

d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs

它是否试图在其他地方调用外部库?

任何帮助都会很棒

<块引用>

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

访问被拒绝。 (例外情况来自 HRESULT:0x80070005(E_ACCESSDENIED))

描述:未处理的异常 执行期间发生的 当前的网络请求。请查看 堆栈跟踪以获取有关的更多信息 错误及其起源 代码。

异常详细信息: 系统未授权访问异常: 访问被拒绝。 (例外情况来自 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 帐户,然后检查 用于所需访问的框。

来源错误:

生成了未处理的异常 当前执行期间 网络请求。有关信息 异常的起源和地点 可以使用异常来识别 下面的堆栈跟踪。

堆栈跟踪:

[UnauthorizedAccessException:访问 被拒绝。 (HRESULT 的异常: 0x80070005(E_ACCESSDENIED))]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 错误代码,IntPtr错误信息)+0
System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 错误代码)+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

[目标调用异常:异常 已被目标投掷 调用。]
System.RuntimeTypeHandle.CreateInstance(RuntimeType 类型、布尔值 publicOnly、布尔值 noCheck、布尔值&可以缓存, RuntimeMethodHandleInternal&演员, 布尔& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(布尔值 publicOnly,布尔值skipCheckThis, 布尔值 fillCache) +98
System.RuntimeType.CreateInstanceDefaultCtor(布尔值 仅限公共,布尔值 跳过可见性检查,布尔值 SkipCheckThis,布尔值 fillCache) +241 System.Activator.CreateInstance(类型 类型,布尔非公共)+69
NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(类型 类型)+8
NHibernate.Driver.ReflectionBasedDriver.CreateCommand() +28 NHibernate.Driver.SqlServerCeDriver.Configure(IDictionary2 设置)+99
Orchard.Data.Providers.OrchardSqlServerCeDriver.Configure(IDictionary
2 设置)中 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Providers\SqlCeDataServicesProvider.cs:77 NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 设置)+158

[HibernateException:无法创建 司机从 Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework,版本=1.0.20.0, 文化=中立,PublicKeyToken=null。] NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary2 设置)+241
NHibernate.Connection.ConnectionProvider.Configure(IDictionary
2 设置)+86
NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary2 设置)+351
NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary
2 属性)+953
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(类型 实体类型)中 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\SessionLocator.cs:29 Orchard.Data.Repository1.get_Session() 在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:26 Orchard.Data.Repository1.get_Table() 在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:30 Orchard.Data.Repository1.Fetch(表达式1 谓词)在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:126 Orchard.Data.Repository1.Get(表达式1 谓词)在 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:91 Orchard.Data.Repository1.Orchard.Data.IRepository.Get(表达式 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.Environment.DefaultOrchardHost.b__1(ShellSettings 设置)中 d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:100 System.Linq.WhereSelectArrayIterator2.MoveNext() +85 System.Linq.Buffer1..ctor(IEnumerable1 来源)+217
System.Linq.Enumerable.ToArray(IEnumerable
1 来源)+78
Orchard.Environment.DefaultOrchardHost.BuildCurrent() 在 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\Projects\Orchard-1.x\src\Orchard.Web\Global.asax.cs:22

[HttpException (0x80004005):无法 从创建驱动程序 Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework,版本=1.0.20.0, 文化=中立,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 上下文)+339 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr 应用上下文)+253

[HttpException (0x80004005):无法 从创建驱动程序 Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework,版本=1.0.20.0, 文化=中立,PublicKeyToken=null。] System.Web.HttpRuntime.FirstRequestInit(HttpContext 上下文)+8950644
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext 上下文)+97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,HttpContext 上下文)+256

版本信息:Microsoft .NET 框架版本:4.0.30319;网络平台 版本:4.0.30319.1

I am recieving an error message what appears to be permission related. I can't workout which file needs permissions changing on. What I was also curious about was why the error is looking at paths like

d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs

Is it trying to call upon an external library elsewhere?

Any help would be great

Server Error in '/' Application.

Access is denied. (Exception from
HRESULT: 0x80070005 (E_ACCESSDENIED))

Description: An unhandled exception
occurred during the execution of the
current web request. Please review the
stack trace for more information about
the error and where it originated in
the code.

Exception Details:
System.UnauthorizedAccessException:
Access is denied. (Exception from
HRESULT: 0x80070005 (E_ACCESSDENIED))

ASP.NET is not authorized to access
the requested resource. Consider
granting access rights to the resource
to the ASP.NET request identity.
ASP.NET has a base process identity
(typically {MACHINE}\ASPNET on IIS 5
or Network Service on IIS 6 and IIS 7,
and the configured application pool
identity on IIS 7.5) that is used if
the application is not impersonating.
If the application is impersonating
via ,
the identity will be the anonymous
user (typically IUSR_MACHINENAME) or
the authenticated request user.

To grant ASP.NET access to a file,
right-click the file in 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.

Source Error:

An unhandled exception was generated
during the execution of the current
web request. Information regarding the
origin and location of the exception
can be identified using the exception
stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access
is denied. (Exception from 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(String
fileName) +76
System.Data.SqlServerCe.NativeMethodsHelper..ctor(String
modulePath) +27
System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String
modulePath) +281
System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder(String
privateInstall) +76
System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()
+225 System.Data.SqlServerCe.SqlCeCommand..ctor()
+65

[TargetInvocationException: Exception
has been thrown by the target of an
invocation.]
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(Type
type) +8
NHibernate.Driver.ReflectionBasedDriver.CreateCommand()
+28 NHibernate.Driver.SqlServerCeDriver.Configure(IDictionary2
settings) +99
Orchard.Data.Providers.OrchardSqlServerCeDriver.Configure(IDictionary
2
settings) in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Providers\SqlCeDataServicesProvider.cs:77
NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2
settings) +158

[HibernateException: Could not create
the driver from
Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver,
Orchard.Framework, Version=1.0.20.0,
Culture=neutral, PublicKeyToken=null.]
NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary2
settings) +241
NHibernate.Connection.ConnectionProvider.Configure(IDictionary
2
settings) +86
NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary2
settings) +351
NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary
2
properties) +953
NHibernate.Cfg.Configuration.BuildSettings()
+17 NHibernate.Cfg.Configuration.BuildSessionFactory()
+44 Orchard.Data.SessionFactoryHolder.BuildSessionFactory()
in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\SessionFactoryHolder.cs:74
Orchard.Data.SessionFactoryHolder.GetSessionFactory()
in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\SessionFactoryHolder.cs:52
Orchard.Data.SessionLocator.For(Type
entityType) in
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()
in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:30 Orchard.Data.Repository1.Fetch(Expression1
predicate) in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:126 Orchard.Data.Repository1.Get(Expression1
predicate) in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:91 Orchard.Data.Repository1.Orchard.Data.IRepository<T>.Get(Expression1
predicate) in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Data\Repository.cs:60 Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord()
in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:52
Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor()
in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:25
Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings
settings) in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\ShellBuilders\ShellContextFactory.cs:66
Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings
settings) in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:128
Orchard.Environment.DefaultOrchardHost.b__1(ShellSettings
settings) in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:100
System.Linq.WhereSelectArrayIterator2.MoveNext()
+85 System.Linq.Buffer
1..ctor(IEnumerable1
source) +217
System.Linq.Enumerable.ToArray(IEnumerable
1
source) +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()
in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:56
Orchard.Web.MvcApplication.Application_Start()
in
d:\TeamCity\Projects\Orchard-1.x\src\Orchard.Web\Global.asax.cs:22

[HttpException (0x80004005): Could not
create the driver from
Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver,
Orchard.Framework, Version=1.0.20.0,
Culture=neutral, PublicKeyToken=null.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext
context, HttpApplication app) +9028953
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context,
MethodInfo[] handlers) +131
System.Web.HttpApplication.InitSpecial(HttpApplicationState
state, MethodInfo[] handlers, IntPtr
appContext, HttpContext context) +194
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +339
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext) +253

[HttpException (0x80004005): Could not
create the driver from
Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver,
Orchard.Framework, Version=1.0.20.0,
Culture=neutral, PublicKeyToken=null.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext
context) +8950644
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext
context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +256

Version Information: Microsoft .NET
Framework Version:4.0.30319; ASP.NET
Version:4.0.30319.1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

柏林苍穹下 2024-10-25 09:21:11

D:\TeamCity\Projects\Orchard-1.x 的路径有点误导,它们出现在 堆栈跟踪,更具体地说是指项目最初构建的位置,而不是 Orchard 正在寻找资源的位置。

TeamCity 是一个持续集成系统在.NET 世界中使用相当广泛。

我无法为您的问题提供具体的解决方案,您认为这是权限问题的假设似乎是正确的。我建议使用 进程监视器来追踪来源错误的

The paths to D:\TeamCity\Projects\Orchard-1.x are a bit of a misdirection, they appear within the stack trace and more specifically refer to where the project was originally built, not where Orchard is looking for resources.

TeamCity is a Continuous Integration System used quite widely in the .NET World.

I can't give you a concrete solution to your problem, you do appear to be correct in your assumption that it is a permissions issue. I would recommend using process monitor to track down origin of the error.

关于从前 2024-10-25 09:21:11

我遇到了类似问题(使用 Sql Server Compact 4.0 的 MVC 3 站点),带有运行 Plesk 控制面板的托管程序,我修复了它 通过向“Plesk IIS WP 用户”授予 \bin 文件夹及其所有子对象的“读取/执行”权限。

I had a similar problem (an MVC 3 site using Sql Server Compact 4.0) with a hoster that runs the Plesk control panel, and I fixed it by giving "Read/Execute" rights to the the "Plesk IIS WP User" for the \bin folder and all its child objects.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文