WCF service host in IIS 7.0 with svcutil.exe

前端 未结 1 883
醉梦人生
醉梦人生 2021-01-27 14:19

After host my service in Host I want to svcutil.exe will be http://www.esimsol.com/evalservicesite/eval.svc?wsdl

but when i view my

相关标签:
1条回答
  • 2021-01-27 15:00

    Simply,

    • Apply the Namespace property to the ServiceContractAttribute on the service contract interface
    • Apply the Namespace property to the ServiceBehaviorAttribute on the class that implements the service
    • Apply the Namespace property to the DataContractAttribute on every class that is involved with the service (parameters, return values)
    • Change the namespace for the binding, either on the binding class or in the .config file

    Details :

    [ServiceContract ( Namespace = "http://www.esimsol.com/evalservicesite" )]
    public interface I ...
    {
    

    &

    [ServiceBehavior ( Namespace = "http://www.esimsol.com/evalservicesite" )]
    public class ... : I ...
    {
    

    &

    [DataContract ( Namespace = "http://www.esimsol.com/evalservicesite" )]
    public class ...
    {
    

    &

    < services >
        < service ... >
            < endpoint ... bindingNamespace="http://www.esimsol.com/evalservicesite" />
        </ service >
    </ services >
    
    0 讨论(0)
提交回复
热议问题