问题
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