<package id="RavenDB.Embedded" version="2.5.2874" targetFramework="net45" />
[Test]
public void Cant_Use_Embedded_Http_Server()
{
var port = new Random().Next(49152, 65535);
Console.WriteLine(url);
NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(port);
using (var docStore = new EmbeddableDocumentStore
{
UseEmbeddedHttpServer = true,
Url = url
}.Initialize())
using (var session = docStore.OpenSession())
{
session.Store(new {Name = "Ronnie"});
session.SaveChanges(); // System.Net.WebException : Unable to connect to the remote server
}
}
System.Net.WebException : Unable to connect to the remote server
----> System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it
127.0.0.1:50574 at System.Net.HttpWebRequest.GetRequestStream(ref TransportContext context)
at System.Net.HttpWebRequest.GetRequestStream()
at Raven.Abstractions.Connection.HttpRequestHelper.WriteDataToRequest(HttpWebRequest req, String data, Boolean disableCompression)
at Raven.Client.Connection.HttpJsonRequest.Write(String data)
at Raven.Client.Connection.ServerClient.DirectBatch(IEnumerable`1 commandDatas, OperationMetadata operationMetadata)
at Raven.Client.Connection.ServerClient.<>c__DisplayClass91.<Batch>b__90(OperationMetadata u)
at Raven.Client.Connection.ReplicationInformer.TryOperation(Func`2 operation, OperationMetadata operationMetadata, OperationMetadata primaryOperationMetadata, Boolean avoidThrowing, ref T result, ref Boolean wasTimeout)
at Raven.Client.Connection.ReplicationInformer.ExecuteWithReplication(String method, String primaryUrl, OperationCredentials primaryCredentials, Int32 currentRequest, Int32 currentReadStripingBase, Func`2 operation)
at Raven.Client.Connection.ServerClient.ExecuteWithReplication(String method, Func`2 operation)
at Raven.Client.Connection.ServerClient.Batch(IEnumerable`1 commandDatas)
at Raven.Client.Document.DocumentSession.SaveChanges()
at Tests.SomeTests.Cant_Use_Embedded_Http_Server() in SomeTests.cs: line 34
--SocketException
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, ref Socket socket, ref IPAddress address, ConnectSocketState state, IAsyncResult asyncResult, ref Exception exception)