【问题标题】:RavenDB error > Non database file or corrupted dbRavenDB 错误 > 非数据库文件或损坏的数据库
【发布时间】:2012-06-17 13:19:14
【问题描述】:

我第一次运行我的应用程序时一切正常。 我可以毫无问题地注册项目。

但关闭应用程序并再次运行后出现以下错误:

完整图片在:http://i.stack.imgur.com/33Whm.png

配置

忍者

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();
    }
}   

连接字符串

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

控制器

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

我总是第二次运行应用程序,出现错误!为什么?

【问题讨论】:

    标签: nosql asp.net-mvc-4 ravendb


    【解决方案1】:

    磁盘上的文件在创建后正在修改。 请检查您是否有任何可能导致此问题的原因。

    这可能表明您的 HD 存在逻辑或物理问题。

    【讨论】:

    • 我无法识别任何可能正在修改此文件夹的内容。有什么建议吗?
    猜你喜欢
    • 2011-12-25
    • 1970-01-01
    • 2014-03-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-20
    • 2014-03-18
    • 1970-01-01
    相关资源
    最近更新 更多