Я пытаюсь развернуть базу данных Raven на моем сайте под управлением .Net 4 в интегрированном режиме (сайт ранее использовался для размещения сайта ASP.Net MVC 3.
Мой файл конфигурации:
<appSettings>
<add key="Raven/DataDir" value="~\App_Data"/>
<add key="Raven/AnonymousAccess" value="All"/>
<add key="Raven/Port" value="80"/>
</appSettings>
<system.webServer>
<handlers>
<add name="All" path="*" verb="*"
type="Raven.Web.ForwardToRavenRespondersFactory, Raven.Web"/>
</handlers>
</system.webServer>
Тем не менее, я получаю следующее исключение:
**Error FileAccessDenied (JET_errFileAccessDenied, Cannot access file, the file is locked or in use)
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: Microsoft.Isam.Esent.Interop.EsentErrorException: Error FileAccessDenied (JET_errFileAccessDenied, Cannot access file, the file is locked or in use)
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:
[EsentErrorException: Error FileAccessDenied (JET_errFileAccessDenied, Cannot access file, the file is locked or in use)]
Microsoft.Isam.Esent.Interop.Api.Fail(Int32 err) in C:\Work\ravendb\SharedLibs\Sources\ManagedEsent-48322\EsentInterop\Api.cs:2279
Microsoft.Isam.Esent.Interop.Api.JetInit(JET_INSTANCE& instance) in C:\Work\ravendb\SharedLibs\Sources\ManagedEsent-48322\EsentInterop\Api.cs:130
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator) in c:\Builds\raven\Raven.Storage.Esent\TransactionalStorage.cs:169
[InvalidOperationException: Could not open transactional storage: d:\IIS\domainfolder\ravendb\App_Data\Data]
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator) in c:\Builds\raven\Raven.Storage.Esent\TransactionalStorage.cs:182
Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration) in c:\Builds\raven\Raven.Database\DocumentDatabase.cs:127
Raven.Web.ForwardToRavenRespondersFactory..cctor() in c:\Builds\raven\Raven.Web\ForwardToRavenRespondersFactory.cs:31
[TypeInitializationException: The type initializer for 'Raven.Web.ForwardToRavenRespondersFactory' threw an exception.]
Raven.Web.ForwardToRavenRespondersFactory..ctor() +0
[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
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1136
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +23
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
System.Web.Configuration.HandlerFactoryCache..ctor(String type) +46
System.Web.HttpApplication.GetFactory(String type) +81
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +223
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184**
Я связался со своим хостом и получил подтверждение, что у меня есть доступ на чтение / запись к App_Data, и я также подтвердил это сам, написав некоторый код для создания там файла.
Мой хозяин намекнул, что моя проблема может быть из-за двойной инициализации моего хранилища данных - что бы это ни значило.
Может кто-нибудь из вас указать мне на решение здесь?
ОБНОВЛЕНИЕ 2011-05-18
Я использую RavenDB-Build-360, доступный в настоящее время по номеру http://builds.hibernatingrhinos.com/download/2004. Я использую инструкции по установке http://ravendb.net/documentation/docs-deployment-iis для запуска на IIS 7.5. Но вместо того, чтобы использовать собственный локальный IIS, я просто копирую содержимое папки / Web на мой хост. Это означает папку / bin, web.config и XAP-файл SilverLight. Так что я не могу отладить свой путь через что-либо.
Я не заметил первую строку (о модуле WebDAV), но я проверю с моим хостом как можно скорее.
Как Raven DB полагается на это?