C# http://localhost:9080/XXXX.asmx / WSDL / Timeout

  • Thread starter Thread starter Markus Freitag
  • Start date Start date
M

Markus Freitag

Guest
Hello,
I have created a DLL which allows the connection to a webserver with servicereference in C# project.
My goal is.
To change the endpoint configuration by xml(config) file. How I can do it?
Do I have to copy the configuration entries manually into the configuration file of the exe?
Can I define the timeout via C# code?
Timeout for establishing a connection?
Timeout for the answer?
Change the address from local host to another address?
How to do it correctly, how can I implement it?

I found this. I can't get any further.


What is the difference between asmx and wsdl , when do I need what?
Many thanks for tips, examples, solutions and hints in advance.

Greetings Markus

<!-- ########################################## -->

App.config DLL
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="orderInfoSoap" />
<binding name="productSoap" />
<binding name="readySoap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8081/orderInfo.asmx" binding="basicHttpBinding"
bindingConfiguration="orderInfoSoap" contract="ServiceReferenceOrderInfo.orderInfoSoap"
name="orderInfoSoap" />

App.config EXE
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
</configuration>


Is creating a wrapper class automaitically.
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class orderInfoSoapClient : System.ServiceModel.ClientBase<Conv.ServiceReferenceOrderInfo.orderInfoSoap>, Conv.ServiceReferenceOrderInfo.orderInfoSoap {

public orderInfoSoapClient() {
}

public orderInfoSoapClient(string endpointConfigurationName) :
base(endpointConfigurationName) {
}

public orderInfoSoapClient(string endpointConfigurationName, string remoteAddress) :
base(endpointConfigurationName, remoteAddress) {
}

public orderInfoSoapClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress) {
}

public orderInfoSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress) {
}

Continue reading...
 
Back
Top