X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.ServiceModel.Web%2FTest%2FSystem.ServiceModel.Dispatcher%2FWebHttpDispatchOperationSelectorTest.cs;h=d99036dfdbde7bac5fd3dffce71cd67cd3371398;hb=ff49850dfc18f5991246a203184fa1e0b8a7c7ab;hp=bb4593ac99e17df7673ff885f44be428c02be00e;hpb=4ed1d9261065809c0932c7a5f75ab80a03e65d16;p=mono.git diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs index bb4593ac99e..d99036dfdbd 100644 --- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs +++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs @@ -39,6 +39,8 @@ using System.Text; using System.Xml; using NUnit.Framework; +using MonoTests.Helpers; + namespace MonoTests.System.ServiceModel.Dispatcher { [TestFixture] @@ -257,12 +259,13 @@ namespace MonoTests.System.ServiceModel.Dispatcher public void WebMessageFormats () { var host = new WebServiceHost (typeof (Hello)); - host.AddServiceEndpoint (typeof (IHello), new WebHttpBinding (), "http://localhost:37564/"); + var port = NetworkHelpers.FindFreePort (); + host.AddServiceEndpoint (typeof (IHello), new WebHttpBinding (), "http://localhost:" + port + "/"); host.Description.Behaviors.Find ().IncludeExceptionDetailInFaults = true; host.Open (); try { // run client - using (ChannelFactory factory = new ChannelFactory (new WebHttpBinding (), "http://localhost:37564/")) + using (ChannelFactory factory = new ChannelFactory (new WebHttpBinding (), "http://localhost:" + port + "/")) { factory.Endpoint.Behaviors.Add (new WebHttpBehavior ()); IHello h = factory.CreateChannel ();