, :
public class Service : IService
{
public void SendMessage(string message)
{
}
}
var result = new ChannelFactory<IService>("*", new EndpointAddress(serviceAddress));
IService yourService = result.CreateChannel();
yourService.SendMessage("It works!");
result.Close();
:
<client>
<endpoint binding="wsHttpBinding" bindingConfiguration="wsHttpBinding" behaviorConfiguration="standardBehavior" contract="IService" name="Service"/>
.
.
</client>
30 + , IIS. , WCF, , ChannetFactory , .
I used the Request Reply and .Net 4.5 message template here.
source
share