2

The first time I run my application everything works normally. I can register items with no problems.

But after closing the application and run it again the following error occurs:

RavenDB Error Non database file or corrupted db

Full image in: https://i.sstatic.net/33Whm.png

Config

Ninject

public class RavenDBNinjectModule : NinjectModule { public override void Load() { Bind<IDocumentStore>().ToMethod(context => { NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080); var documentStore = new EmbeddableDocumentStore { ConnectionStringName="RavenDB", UseEmbeddedHttpServer = true }; return documentStore.Initialize(); }).InSingletonScope(); Bind<IDocumentSession>().ToMethod(context => context.Kernel.Get<IDocumentStore>().OpenSession()).InRequestScope(); } } 

Connection String

<connectionStrings> <add name="RavenDB" connectionString="DataDir = ~\App_Data" /> </connectionStrings> 

Controller

private readonly IDocumentSession _documentSession; public PluginsController (IDocumentSession documentSession) { _documentSession = documentSession; } 

It is always the second time I run the app, the error occurs! Why?

1 Answer 1

1

Something is modifying the on disk file after it is created. Please check if you have anything there that can cause this.

This may indicate some logical or physical issue with your HD.

Sign up to request clarification or add additional context in comments.

1 Comment

I can not identify anything that might be modifying this folder. Any tips?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.