Конфигурация конечной точки клиента '*' не найдена в 1 конечных точках, WCF, Mono

Эй, ребята,

я пытаюсь получить доступ к веб-сервису, размещенному на виртуальной машине (Windows 7) с моего хоста Ubuntu, используя Mono.

Я могу импортировать файл wdsl и создать ссылку на службу. Я скопировал App.config из другого работающего клиента, правильно обращающегося к веб-сервису.

Когда я пытаюсь подключиться к веб-сервису, используя с помощью системы;

namespace MonoTest
{
class MainClass
{
    public static void Main (string[] args)
    {
        Console.WriteLine ("Hello World!");
        TestServer.Service1Client client = new TestServer.Service1Client("Test");
        Console.WriteLine(client.GetData(12));
        Console.ReadLine();
    }
}
}

Я получаю сообщение об ошибке:

System.InvalidOperationException: Client endpoint configuration 'Test' was not found in 1 endpoints.
  at System.ServiceModel.ChannelFactory.ApplyConfiguration (System.String endpointConfig) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.ChannelFactory.InitializeEndpoint (System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.ChannelFactory`1[MonoTest.TestServer.IService1]..ctor (System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.ClientBase`1[MonoTest.TestServer.IService1].Initialize (System.ServiceModel.InstanceContext instance, System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.ClientBase`1[MonoTest.TestServer.IService1]..ctor (System.ServiceModel.InstanceContext instance, System.String endpointConfigurationName) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.ClientBase`1[MonoTest.TestServer.IService1]..ctor (System.String endpointConfigurationName) [0x00000] in <filename unknown>:0 
  at MonoTest.TestServer.Service1Client..ctor (System.String endpointConfigurationName) [0x00000] in <filename unknown>:0 
  at MonoTest.MainClass.Main (System.String[] args) [0x0000a] in /home/***/WebserviceTest/MonoTest/MonoTest/Main.cs:11 

Мой файл App.config выглядит следующим образом:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsHttpBinding>
                <binding name="WSHttpBinding_IService1" />
            </wsHttpBinding>
        </bindings>
        <client>
            <endpoint name="Test"
                address="http://192.168.178.34:8732/Design_Time_Addresses/TestServer/Service1/"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1"
                contract="ServiceReference1.IService1" >
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>

Кто-нибудь сделал это с помощью Linux?

6
задан Kiquenet 11 November 2013 в 08:29
поделиться