Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Blog - NServiceBus fails to connect to RavenDB during high load
public class NServiceBusConfigurator : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization
{
public void Init()
{
Configure.Instance.CustomiseRavenPersistence(ConfigureRavenStore);
}
private static void ConfigureRavenStore(Raven.Client.IDocumentStore store)
{
store.JsonRequestFactory.ConfigureRequest += (sender, args) =>
{
var httpWebRequest = ((HttpWebRequest) args.Request);
httpWebRequest.UnsafeAuthenticatedConnectionSharing = true;
httpWebRequest.PreAuthenticate = true;
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment