2011-01-31 14 views
0

OK、IISでホストしたいと思うWCFサービスがあります。私は "Windows Communication Foundation Non-Http Activation"を有効にしていますので、問題はありません。 .NET 4.0がインストールされたWindows 7コンピュータでIIS 7,5を実行しています。私のweb.configファイルには、次のようになります。IIS7でnettcp WCFサービスをホストできません

<?xml version="1.0"?> 
<configuration> 
    <system.serviceModel> 
    <services> 
     <service name="FirstWcfService.Service" behaviorConfiguration="ServiceBehavior"> 
     <!-- Service Endpoints --> 
     <endpoint address="" binding="netTcpBinding" contract="NetTcpServiceTest.IMySuperService" 
      bindingConfiguration="tcpbinding"/> 
     <endpoint address="mextcp" binding="mexTcpBinding" contract="IMetadataExchange"/> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="ServiceBehavior"> 
      <!-- To avoid disclosing metadata information, set the value below to false 
       and remove the metadata endpoint above before deployment --> 
      <serviceMetadata httpGetEnabled="true"/> 
      <!-- To receive exception details in faults for debugging purposes, 
       set the value below to true. Set to false before deployment to avoid 
       disclosing exception information --> 
      <serviceDebug includeExceptionDetailInFaults="false"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <bindings> 
     <netTcpBinding> 
     <binding name="tcpbinding" portSharingEnabled="true"> 
      <!--<security mode="None"></security>--> 
      <security mode="Transport"> 
      <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"/> 
      <message clientCredentialType="Windows"/> 
      </security> 
     </binding> 
     <binding name="mexTcpBinding" portSharingEnabled="true"> 
      <security mode="None" /> 
     </binding> 
     </netTcpBinding> 
    </bindings> 
    </system.serviceModel> 
</configuration> 

サービスはIISの既定のWebサイトの下に「NetTcpServiceTest」と呼ばれるアプリケーションとしてホストされています。私はnet.tcpへの参照を追加しようとすると://localhost/NetTcpServiceTest/MySuperService.svc/mextcpをVisual Studioで、私は次のエラーを取得する:

Metadata contains a reference that cannot be resolved: 'net.tcp://localhost/NetTcpServiceTest/MySuperService.svc/mextcp'. 
The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost/NetTcpServiceTest/MySuperService.svc/mextcp' is unavailable for the protocol of the address. 
If the service is defined in the current solution, try building the solution and adding the service reference again. 

そして、イベントログのエラーは、次のとおりです。

An error occurred while trying to listen for the URL '/LM/W3SVC/1/ROOT/NetTcpServiceTest'. This worker process will be terminated. 
Sender Information: net.tcp 
Exception: System.ServiceModel.WasHosting.TcpAppDomainProtocolHandler/65824025 
Process Name: System.ServiceModel.CommunicationException: The TransportManager failed to listen on the supplied URI using the NetTcpPortSharing service: . 

サイトとアプリケーションのバインディングも有効にしました。誰もこれを解決する方法を知っていますか?私がインターネット上でそれを検索したとき、唯一の答えはIISと.NETを再インストールすることでしたが、それは本当の解決策のようには聞こえません。

+0

あなたは解決策を見つけましたか? – Martin

+0

私は新しいコンピュータを手に入れたときに問題が解決したので、私は新しいWin7でIISの下でnettcpサービスをホストすることができます。だから私は自分の問題に対する答えを見いだせなかった。同じ問題がありますか? –

答えて

0

万一、.NETの後にIISをインストールした場合は、aspnet_regiis.exeを試してみてください。

関連する問題