Im trying to get RavenDB running in embedded mode out of the App_Data
folder in a shared hosting setting (Full Trust) working. I'm getting
"Error FileAccessDenied (JET_errFileAccessDenied, Cannot access file,
the file is locked or in use)". There's some related discussion here:
https://groups.google.com/forum/#!topic/ravendb/6A_i1HoDSgo
I'm fairly confident that this is not at permissions issue. For
example, if I run this code, the file write succeeds, but the RavenDB
write fails:
public ActionResult Index()
{
using (var writer = new StreamWriter(Server.MapPath("~/App_Data/
foo.txt")))
{
writer.Write("baz");
}
var documentStore = new EmbeddableDocumentStore();
documentStore.DataDirectory = Server.MapPath("~/App_Data");
documentStore.Initialize();
using (var session = documentStore.OpenSession())
{
var document = new
{
Foo = "bar",
};
session.Store(document);
session.SaveChanges();
}
return View();
}
I've reviewed and tested the TransactionalStorage#ctor
(Raven.Storage.Esent.TransactionalStorage), lines 70-83, and that
seems to be doing its job correctly, setting up the path.
Any suggestions?
Michael