Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ravendb Raven.Server.exe无法授予侦听http的权限_Ravendb_Netsh_Http.sys_Ravendb Http - Fatal编程技术网

Ravendb Raven.Server.exe无法授予侦听http的权限

Ravendb Raven.Server.exe无法授予侦听http的权限,ravendb,netsh,http.sys,ravendb-http,Ravendb,Netsh,Http.sys,Ravendb Http,我已将RavenDB 2.5.0安装为Windows服务。 无论是否以管理员身份运行Raven.Server.exe,我都会收到以下信息: Trying to revoke rights for http.sys runas netsh http delete urlacl url=https://+:8080/ Trying to grant rights for http.sys runas netsh http add urlacl url=http://+:8080/ user="End

我已将RavenDB 2.5.0安装为Windows服务。 无论是否以管理员身份运行Raven.Server.exe,我都会收到以下信息:

Trying to revoke rights for http.sys
runas netsh http delete urlacl url=https://+:8080/
Trying to grant rights for http.sys
runas netsh http add urlacl url=http://+:8080/ user="Endri-PC\Endri"
Failed to grant rights for listening to http, exit codes: (1 and 1)
A critical error occurred while starting the server. Please see the exception de
tails bellow for more details:
System.InvalidOperationException: Could not write to location: C:\RavenDB\Databa
se\System. Make sure you have read/write permissions for this path. ---> Microso
ft.Isam.Esent.Interop.EsentFileAccessDeniedException: Cannot access file, the fi
le is locked or in use
   at Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGen
erator, OrderedPartCollection`1 documentCodecs)
   --- End of inner exception stack trace ---
   at Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGen
erator, OrderedPartCollection`1 documentCodecs)
   at Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configura
tion, TransportState transportState)
   at Raven.Server.RavenDbServer..ctor(InMemoryRavenConfiguration settings)
   at Raven.Server.Program.RunServerInDebugMode(RavenConfiguration ravenConfigur
ation, Boolean launchBrowser)
   at Raven.Server.Program.RunInDebugMode(Nullable`1 anonymousUserAccessMode, Ra
venConfiguration ravenConfiguration, Boolean launchBrowser, Boolean noLog)
   at Raven.Server.Program.<>c__DisplayClass34.<InteractiveRun>b__1b()
   at Raven.Server.Program.InteractiveRun(String[] args)
   at Raven.Server.Program.Main(String[] args)
Press any key to continue...
尝试撤销http.sys的权限
runas netsh http delete urlacl url=https://+:8080/
正在尝试授予http.sys的权限
runas netsh http add urlacl url=http://+:8080/user=“Endri PC\Endri”
无法授予侦听http的权限,退出代码:(1和1)
启动服务器时发生严重错误。请看例外情况
有关详细信息,请参见下文:
System.InvalidOperationException:无法写入位置:C:\RavenDB\Databa
se\系统。确保您对此路径具有读/写权限。-->微软
ft.Isam.Esent.Interop.EsentFileAccessDeniedException:无法访问文件,fi
le已锁定或正在使用
在Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGen
操作员,OrderedPartCollection`1文档编码解码器)
---内部异常堆栈跟踪的结束---
在Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGen
操作员,OrderedPartCollection`1文档编码解码器)
在Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration配置
运输状态(运输状态)
位于Raven.Server.RavenDbServer..ctor(InMemoryRavenConfiguration设置)
在Raven.Server.Program.RunServerInDebugMode(RavenConfiguration RavenConfiguration
布尔启动(浏览器)
在Raven.Server.Program.RunInDebugMode(Nullable`1 anonymousUserAccessMode,Ra
VENConConfiguration、布尔启动浏览器、布尔noLog)
在Raven.Server.Program.c__DisplayClass34.b__1b()上
位于Raven.Server.Program.InteractiveRun(字符串[]args)
位于Raven.Server.Program.Main(字符串[]args)
按任意键继续。。。

知道怎么办吗?

您既没有访问8080端口的权限,也没有访问数据库文件夹的权限。如果要在您的帐户上运行RavenDB,请授予自己对文件夹
C:\RavenDB\Database\System
的权限,并在提升的控制台中运行此命令:

netsh http add urlacl url=http://+:8080/


我只是在遵循RavenDB文档的“基本概念”部分时遇到了同样的问题,输出如下:

C:\RavenDB>Raven.Server.exe
Trying to grant rights for http.sys
runas netsh http add urlacl url=http://+:8080/ user="User-PC\User"
Failed to grant rights for listening to http, exit codes: (0 and 1)
A critical error occurred while starting the server. Please see the exception details bellow for more details:
System.InvalidOperationException: Could not write to location: C:\RavenDB\Data.
Make sure you have read/write permissions for this path. ---> Microsoft.Isam.Esent.Interop.EsentFileAccessDeniedException: Cannot access file, the file is locked or in use
<stack trace follows>
C:\RavenDB>Raven.Server.exe
正在尝试授予http.sys的权限
runas netsh http add urlacl url=http://+:8080/user=“user PC\user”
无法授予侦听http的权限,退出代码:(0和1)
启动服务器时发生严重错误。有关更多详细信息,请参见下面的异常详细信息:
System.InvalidOperationException:无法写入位置:C:\RavenDB\Data。
确保您对此路径具有读/写权限。-->Microsoft.Isam.Esent.Interop.EsentFileAccessDeniedException:无法访问文件,该文件已锁定或正在使用
问题是RavenDB安装程序已自动将RavenDB服务器作为Windows服务启动,从而阻止命令行Raven.Server.exe访问正确的目录。我刚刚打开了服务控制面板(开始菜单->Services.msc)并停止了RavenDB服务。然后,从命令行启动Raven.Server.exe,如文档中所示


请注意,这是在Windows 7 x64 Professional计算机上以RavenDB 2.5.2851的开发模式运行的

我已经完全控制了我的帐户,管理员帐户仍然拥有它,但仍然存在相同的错误…例外情况是,使用的帐户不是管理员,而是Endri PC\Endriagain,我已授予我的帐户Endri PC\Endri的完全权限,也授予管理员帐户,此外,我还尝试在CMD上以管理员身份运行上述命令,但仍然相同。这些都是计算机中需要了解的基本情况……此外,收到与实际问题无关的异常情况并不少见,只需注意,由于服务正在运行,您根本不需要运行控制台应用程序。只需打开localhost:8080的浏览器,您就会看到RavenDB数据库,它们都按预期工作。(默认为空)