How to disable RavenDB replication

半世苍凉 提交于 2019-11-28 03:21:55

问题


How do I disable RavenDB replication? The reason for that is I have a simple database on one server and I don't need any replication at this point.

IDocumentStore tmpStore = new DocumentStore
{
    Url = url
};

tmpStore.Initialize();
tmpStore.DatabaseCommands.EnsureDatabaseExists(dbName); // WebException

If I try to ensure that database was created I get a WebException with HTTP status 404. This error occurred when RavenDB makes request to /docs/Raven/Replication/Destinations. Or shall I just ignore this exception?


回答1:


The web exception is thrown and caught internally inside RavenDB Client. You can safely continue working, and your code will execute properly.




回答2:


The 404 is caused by Raven checking to see if you have replication setup and you can safely ignore it.

http://groups.google.com/group/ravendb/browse_thread/thread/5cdde7854bc929f4

http://groups.google.com/group/ravendb/browse_thread/thread/6cb950e1eb760c08/c09ce446a3f4e99f



来源:https://stackoverflow.com/questions/5869700/how-to-disable-ravendb-replication

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!