J'ai développé une application ASP.Net MVC 3 qui utilise RavenDB Embedded comme magasin de sauvegarde intégré pour les données. J'ai utilisé le tutoriel this pour commencer à créer une application MVC avec RavenDB Embedded. Je suis en mesure de l'exécuter très bien sur mon PC de développement, mais quand il est venu le temps de le déployer sur notre serveur Windows Server 2003 en cours d'exécution IIS6 jetai l'erreur suivante:Problème de déploiement de RavenDB
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.EsentFileAccessDeniedException: 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:
[EsentFileAccessDeniedException: Cannot access file, the file is locked or in use] Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) in C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\Api.cs:2736 Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator) in c:\Builds\RavenDB-Stable\Raven.Storage.Esent\TransactionalStorage.cs:207
[InvalidOperationException: Could not open transactional storage: C:\inetpub\wwwroot\MyApp\App_Data\Database\RavenDB\Data]
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator) in c:\Builds\RavenDB-Stable\Raven.Storage.Esent\TransactionalStorage.cs:222 Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration) in c:\Builds\RavenDB-Stable\Raven.Database\DocumentDatabase.cs:185
Raven.Client.Embedded.EmbeddableDocumentStore.InitializeInternal() in c:\Builds\RavenDB-Stable\Raven.Client.Embedded\EmbeddableDocumentStore.cs:143 Raven.Client.Document.DocumentStore.Initialize() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\DocumentStore.cs:496 MyApp.CompositionRoot.CreateControllerFactory() in ...\MyApp\CompositionRoot.cs:36 MyApp.CompositionRoot..ctor() in ..\MyApp\CompositionRoot.cs:17
MyApp.MvcApplication.Application_Start() in ...MyApp\Global.asax.cs:38[HttpException (0x80004005): Could not open transactional storage: C:\inetpub\wwwroot\MyApp\App_Data\Database\RavenDB\Data]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +3985477
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +191
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +325
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375[HttpException (0x80004005): Could not open transactional storage: C:\inetpub\wwwroot\MyApp\App_Data\Database\RavenDB\Data]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11524352 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4782309
La source de l'erreur la classe CompositionRoot.cs référencée est lors de l'initialisation du magasin de documents intégrable. Pourquoi cela se passe-t-il uniquement sur le serveur Web et non sur mon PC de développement? Pourquoi? Je ne suis pas sûr de la cause exacte. Toute aide est appréciée.
ressemble à un problème d'autorisations classique s'exécutant sous IIS. Aucun familier avec RavenDB incorporé, mais je voudrais le déplacer en dehors de \ webroot et donner les privilèges de l'utilisateur IIS à ce chemin. – kenny
RavenDB fonctionne-t-il déjà en tant que service ou depuis la ligne de commande? – wal