config配置文件不多说

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <behaviors>
            <serviceBehaviors>
                <behavior name="myBehavior">
                    <serviceMetadata/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <bindings>
          
            <netTcpBinding>
            
                <binding name="myBind" maxReceivedMessageSize="1073741824" transferMode="Buffered" />
            
            </netTcpBinding>

        </bindings>
        <services>
            <service name="WcfServices.Services.Job"  behaviorConfiguration="myBehavior">
                <endpoint name="WcfServices.Services"
                          bindingConfiguration="myBind"
                          address=""
                          binding="netTcpBinding"
                          contract="WcfServices.Contract.IJob">
                </endpoint>
                <endpoint address="mex"
                          binding="mexTcpBinding"
                          contract="IMetadataExchange">
                    
                </endpoint>
                <!-- 不用地址 <host>
                    <baseAddresses>
                        <add baseAddress="net.tcp://localhost:8000/Job"/>
                    </baseAddresses>
                </host>-->
            </service>
        </services>
    </system.serviceModel>
</configuration>

在项目属性选择Web选项卡,使用本地IIS,创建虚拟目录http://localhost/WcfServices,提示安装IIS6,进入控制面板安装IIS6,

还有Framewok3.5.1(不知道不装什么效果没试),安装后,运行打开地址+xx.svc,报错http://www.cnblogs.com/chamy/archive/2012/11/02/2751367.html),OK搞定,使用svcutil 获取元数据。

 

WCF netTcpBinding寄宿到IIS7
    

未能从程序集“System.ServiceModel, Version=3.0.0.0

相关文章:

  • 2022-01-14
  • 2021-12-25
  • 2022-12-23
  • 2021-07-09
  • 2021-11-30
  • 2021-11-08
猜你喜欢
  • 2021-06-23
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
相关资源
相似解决方案