简体   繁体   English

带有svcutil.exe的IIS 7.0中的WCF服务主机

[英]WCF service host in IIS 7.0 with svcutil.exe

After host my service in Host I want to svcutil.exe will be http://www.esimsol.com/evalservicesite/eval.svc?wsdl 在主机中托管我的服务后,我想要svcutil.exe的将是http://www.esimsol.com/evalservicesite/eval.svc?wsdl

but when i view my service svcutil.exe created is following link: 但是,当我查看我的服务svcutil.exe时,创建的链接如下:

http://win-ea8mlbabe9t/evalservicesite/eval.svc?wsdl

How can it possible? 怎么可能呢?

Simply, 只是,

  • Apply the Namespace property to the ServiceContractAttribute on the service contract interface 将名称空间属性应用于服务协定接口上的ServiceContractAttribute
  • Apply the Namespace property to the ServiceBehaviorAttribute on the class that implements the service 将名称空间属性应用于实现服务的类上的ServiceBehaviorAttribute
  • Apply the Namespace property to the DataContractAttribute on every class that is involved with the service (parameters, return values) 将名称空间属性应用于服务所涉及的每个类的DataContractAttribute(参数,返回值)
  • Change the namespace for the binding, either on the binding class or in the .config file 在绑定类或.config文件中更改绑定的名称空间

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 >

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM