2013-06-27 99 views
2

我在IIS7中託管文件時出現以下錯誤。RavenDb - 無法創建數據庫。錯誤: - 未經授權未經授權

Could not get authorization for this command. If you should have access to this operation contact your admin and check the Raven/AnonymousAccess or the Windows Authentication settings in RavenDB I had my configuration as follows:-

<add key="Raven/AnonymousAccess" value="All"/> 

,我改變了下面後,我用Google搜索找到了一些解決方案。我one of the posts由Ayende Rahien他提到了如下改變它(我做了): -

<add key="Raven/AnonymousAccess" value="Admin"/> 

但現在我得到的錯誤是: -

Requested value 'Admin' was not found.

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.ArgumentException: Requested value 'Admin' was not found.

我見過類似於以前的帖子我問題爲Unable to create databases when running RavenDB on IISExpress以及Can't create new DB in RavenDB 2.x

我在做什麼錯?

我的web.config配置如下: - 。

<appSettings> 
     <add key="Raven/Port" value="801"/> 
     <add key="Raven/DataDir" value="~\Database\System"/> 
     <add key="Raven/AnonymousAccess" value="Admin"/> 
</appSettings> 

回答

1

你需要確保你在IIS中啓用身份驗證窗口,所以它實際上可以讓您登錄

+0

是的,我錯過了那。我真是個傻瓜。它在啓用Windows身份驗證後起作用。 – Shubh