我试图通过键入命令 \bin\orchard.exe 并获取Failed to initialize Orchard 会话来从 Orchard.Web 文件夹位置运行 Orchard.exe 。错误,还有一个 UnauthorizedAccessException。我的目标是在命令提示符下创建一个果园主题。但得到错误。错误详情如下:
注意:尝试以不同的方式运行 Orchard.exe,例如打开命令提示符形式的运行提示,从管理员模式等。但每次都得到相同的错误。并且还将所有用户以及网络服务和IIS用户的文件权限更改为完全访问
C:\DemoOrchard\orchard\src\Orchard.Web>bin\orchard.exe
Initializing Orchard session. (This might take a few seconds...)
log4net:ERROR OrchardFileAppender: Failed to open [C:\DemoOrchard\orchard\src\Or
chard.Web\App_Data\Logs\orchard-error]. Attempting [C:\DemoOrchard\orchard\src\O
rchard.Web\App_Data\Logs\orchard-error-1] instead.
log4net:ERROR OrchardFileAppender: Failed to open [C:\DemoOrchard\orchard\src\Or
chard.Web\App_Data\Logs\orchard-debug]. Attempting [C:\DemoOrchard\orchard\src\O
rchard.Web\App_Data\Logs\orchard-debug-1] instead.
log4net:ERROR OrchardFileAppender: Failed to open [C:\DemoOrchard\orchard\src\Or
chard.Web\App_Data\Logs\orchard-recipes]. Attempting [C:\DemoOrchard\orchard\src
\Orchard.Web\App_Data\Logs\orchard-recipes-1] instead.
Error starting up Orchard command line host
--------------------------------------------------------------------------------
Access to the path 'C:\DemoOrchard\orchard\src\Orchard.Web\App_Data\Dependencies
\dependencies.xml' is denied.
Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\De
moOrchard\orchard\src\Orchard.Web\App_Data\Dependencies\dependencies.xml' is den
ied.
Stack Trace:
[UnauthorizedAccessException: Access to the path 'C:\DemoOrchard\orchard\src\Orc
hard.Web\App_Data\Dependencies\dependencies.xml' is denied.]
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I
nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o
ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea
n useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize)
at System.IO.File.Create(String path)
at Orchard.FileSystems.AppData.AppDataFolder.CreateFile(String path) in C:\De
moOrchard\orchard\src\Orchard\FileSystems\AppData\AppDataFolder.cs:line 128
at Orchard.FileSystems.Dependencies.DefaultDependenciesFolder.WriteDependenci
es(String persistancePath, IEnumerable`1 dependencies) in C:\DemoOrchard\orchard
\src\Orchard\FileSystems\Dependencies\DefaultDependenciesFolder.cs:line 102
at Orchard.FileSystems.Dependencies.DefaultDependenciesFolder.StoreDescriptor
s(IEnumerable`1 dependencyDescriptors) in C:\DemoOrchard\orchard\src\Orchard\Fil
eSystems\Dependencies\DefaultDependenciesFolder.cs:line 57
at Orchard.Environment.Extensions.ExtensionLoaderCoordinator.SetupExtensions(
) in C:\DemoOrchard\orchard\src\Orchard\Environment\Extensions\ExtensionLoaderCo
ordinator.cs:line 77
at Orchard.Environment.DefaultOrchardHost.SetupExtensions() in C:\DemoOrchard
\orchard\src\Orchard\Environment\DefaultOrchardHost.cs:line 232
at Orchard.Environment.DefaultOrchardHost.BuildCurrent() in C:\DemoOrchard\or
chard\src\Orchard\Environment\DefaultOrchardHost.cs:line 118
at Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.In
itialize() in C:\DemoOrchard\orchard\src\Orchard\Environment\DefaultOrchardHost.
cs:line 82
at Orchard.Commands.CommandHostAgent.CreateHostContainer() in C:\DemoOrchard\
orchard\src\Orchard\Commands\CommandHostAgent.cs:line 198
at Orchard.Commands.CommandHostAgent.StartHost(TextReader input, TextWriter o
utput) in C:\DemoOrchard\orchard\src\Orchard\Commands\CommandHostAgent.cs:line 1
19
--------------------------------------------------------------------------------
Failed to initialize Orchard session.
C:\DemoOrchard\orchard\src\Orchard.Web>
你知道有什么步骤可以解决这个问题吗?