Merge pull request #2799 from BrzVlad/fix-conc-card-clean
[mono.git] / mcs / class / System.ServiceModel.Web / Test / System.ServiceModel.Description / WebScriptEnablingBehaviorTest.cs
index d735c2ebb702ba28999c3cd9a6ee9653856419a9..a552f6ea0e0f925c7cf9095ef3ba86d3b5fa73dd 100644 (file)
@@ -38,6 +38,8 @@ using System.ServiceModel.Web;
 using System.Text;
 using NUnit.Framework;
 
+using MonoTests.Helpers;
+
 namespace MonoTests.System.ServiceModel.Description
 {
        public class MyHostFactory : WebScriptServiceHostFactory
@@ -64,7 +66,7 @@ namespace MonoTests.System.ServiceModel.Description
                [Test]
                public void ScriptGenerator ()
                {
-                       var url = "http://localhost:37564";
+                       var url = "http://localhost:" + NetworkHelpers.FindFreePort ();
                        var host = new MyHostFactory ().CreateServiceHost (typeof (HogeService));
                        var binding = new WebHttpBinding ();
                        host.AddServiceEndpoint (typeof (IHogeService), binding, url);