首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

WCF双工支配到IIS中的虚拟目录就访问不了

2013-03-21 
WCF双工部署到IIS中的虚拟目录就访问不了?部署到IIS根目录可以正常访问WCF 双工,放到站点的虚拟目录就访问

WCF双工部署到IIS中的虚拟目录就访问不了?
部署到IIS根目录可以正常访问WCF 双工,放到站点的虚拟目录就访问不了?

配置文件:

<?xml version="1.0" encoding="utf-8"?>

<!--
  有关如何配置 ASP.NET 应用程序的详细消息,请访问
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>

  <system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="netTcpBindConfig"  closeTimeout="00:30:00" portSharingEnabled="true"
                openTimeout="00:30:00" receiveTimeout="00:30:00" sendTimeout="00:30:00"
                transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
                hostNameComparisonMode="StrongWildcard" listenBacklog="10">

          <readerQuotas maxDepth="2147483647"
                                    maxStringContentLength="2147483647"
                                    maxArrayLength="2147483647"
                                    maxBytesPerRead="2147483647"
                                    maxNameTableCharCount="2147483647" />
          <reliableSession ordered="true"  inactivityTimeout="00:01:00" enabled="false" />
          <security mode="None">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"  />
            <message clientCredentialType="Windows"  />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="CommonService" name="WcfDoubleTest.CalculatorService">
        <endpoint binding="netTcpBinding" contract="WcfDoubleTest.ICalculator" bindingConfiguration="netTcpBindConfig"/>
        <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>


      <serviceBehaviors>
        <behavior name="CommonService">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true">
      <serviceActivations>
        <add relativeAddress="ab2fc1db5b0d4aca86ce45565616f00c.svc" service="WcfDoubleTest.CalculatorService" />
      </serviceActivations>
    </serviceHostingEnvironment>
  </system.serviceModel>
</configuration>


iis 部署图:
WCF双工支配到IIS中的虚拟目录就访问不了

IIS站点配置图:
WCF双工支配到IIS中的虚拟目录就访问不了
[解决办法]
虚拟站点 需要添加net.tcp协议

热点排行