Example #1
0
        public RavenDbServer Initialize(Action <RavenDBOptions> configure = null)
        {
            if (configuration.IgnoreSslCertificateErros == IgnoreSslCertificateErrorsMode.All)
            {
                // we ignore either all or none at the moment
                ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true;
            }

            owinHttpServer                   = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure);
            options                          = owinHttpServer.Options;
            serverThingsForTests             = new ServerThingsForTests(options);
            documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke, options.SystemDatabase.Configuration.EnableResponseLoggingForEmbeddedDatabases);
            documentStore.Url                = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
            documentStore.Initialize();

            filesStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke, options.SystemDatabase.Configuration.EnableResponseLoggingForEmbeddedDatabases);
            filesStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
            filesStore.Initialize();

            serverStartupTasks = configuration.Container.GetExportedValues <IServerStartupTask>();

            foreach (var task in serverStartupTasks)
            {
                toDispose.Add(task);
                task.Execute(this);
            }

            return(this);
        }
Example #2
0
        public RavenDbServer Initialize(Action <RavenDBOptions> configure = null)
        {
            if (configuration.IgnoreSslCertificateErrors == IgnoreSslCertificateErrorsMode.All)
            {
                // we ignore either all or none at the moment
                ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true;
            }
            BooleanQuery.MaxClauseCount = configuration.MaxClauseCount;

            BooleanQuery.MaxClauseCount = configuration.MaxClauseCount;

            owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure);
            options        = owinHttpServer.Options;

            serverThingsForTests = new ServerThingsForTests(options);
            Func <HttpMessageHandler> httpMessageHandlerFactory = () => new OwinClientHandler(owinHttpServer.Invoke, options.SystemDatabase.Configuration.EnableResponseLoggingForEmbeddedDatabases);

            documentStore.HttpMessageHandlerFactory = httpMessageHandlerFactory;
            documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
            documentStore.Initialize();

            filesStore.HttpMessageHandlerFactory = httpMessageHandlerFactory;
            filesStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
            filesStore.Initialize();

            return(this);
        }
Example #3
0
	    public RavenDbServer Initialize(Action<RavenDBOptions> configure = null)
	    {
            owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure);
            options = owinHttpServer.Options;
            serverThingsForTests = new ServerThingsForTests(options);
	        documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke);
	        documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
	        documentStore.Initialize();
	        return this;
	    }
Example #4
0
 public RavenDbServer Initialize(Action <RavenDBOptions> configure = null)
 {
     owinHttpServer                   = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure);
     options                          = owinHttpServer.Options;
     serverThingsForTests             = new ServerThingsForTests(options);
     documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke);
     documentStore.Url                = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
     documentStore.Initialize();
     return(this);
 }
Example #5
0
	    public RavenDbServer Initialize(Action<RavenDBOptions> configure = null)
	    {
            owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure);
            options = owinHttpServer.Options;
            serverThingsForTests = new ServerThingsForTests(options);
	        documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke);
	        documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
	        documentStore.Initialize();

			foreach (var task in configuration.Container.GetExportedValues<IServerStartupTask>())
			{
				task.Execute(this);
			}

	        return this;
	    }
Example #6
0
        public RavenDbServer Initialize(Action <RavenDBOptions> configure = null)
        {
            owinHttpServer                   = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure);
            options                          = owinHttpServer.Options;
            serverThingsForTests             = new ServerThingsForTests(options);
            documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke);
            documentStore.Url                = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
            documentStore.Initialize();


            filesStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke);
            filesStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
            filesStore.Initialize();

            foreach (var task in configuration.Container.GetExportedValues <IServerStartupTask>())
            {
                task.Execute(this);
            }

            return(this);
        }
Example #7
0
        public RavenDbServer Initialize(Action<RavenDBOptions> configure = null)
        {
            if (configuration.IgnoreSslCertificateErrors == IgnoreSslCertificateErrorsMode.All)
            {
                // we ignore either all or none at the moment
                ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true;
            }
            BooleanQuery.MaxClauseCount = configuration.MaxClauseCount;

            owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure);
            options = owinHttpServer.Options;
            serverThingsForTests = new ServerThingsForTests(options);
            Func<HttpMessageHandler> httpMessageHandlerFactory = ()=>new OwinClientHandler(owinHttpServer.Invoke, options.SystemDatabase.Configuration.EnableResponseLoggingForEmbeddedDatabases);
            documentStore.HttpMessageHandlerFactory = httpMessageHandlerFactory;
            documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
            documentStore.Initialize();

            filesStore.HttpMessageHandlerFactory = httpMessageHandlerFactory;
            filesStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
            filesStore.Initialize();

            return this;
        }
Example #8
0
		public RavenDbServer Initialize(Action<RavenDBOptions> configure = null)
		{
			if (configuration.IgnoreSslCertificateErros == IgnoreSslCertificateErrorsMode.All)
			{
				// we ignore either all or none at the moment
				ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true;
			}

			owinHttpServer = new OwinHttpServer(configuration, useHttpServer: UseEmbeddedHttpServer, configure: configure);
			options = owinHttpServer.Options;
			serverThingsForTests = new ServerThingsForTests(options);
			documentStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke);
			documentStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
			documentStore.Initialize();

			filesStore.HttpMessageHandler = new OwinClientHandler(owinHttpServer.Invoke);
			filesStore.Url = string.IsNullOrWhiteSpace(Url) ? "http://localhost" : Url;
			filesStore.Initialize();

			serverStartupTasks = configuration.Container.GetExportedValues<IServerStartupTask>();

			foreach (var task in serverStartupTasks)
			{
				toDispose.Add(task);
				task.Execute(this);
			}

	        return this;
	    }