报错原因:
System.InvalidOperationException
HResult=0x80131509
Message=Could not find default endpoint element that references contract 'ServiceReference1.SController' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
Source=System.ServiceModel
将WebService的配置保存到调用dll的exe下。
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name=" " />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://www. "
binding="basicHttpBinding" bindingConfiguration="1"
contract="ServiceReference1.1" name="2" />
</client>
</system.serviceModel>