2011-01-31 5 views
0

좋아, IIS에서 호스팅하고 싶은 정말 간단한 WCF 서비스가 있습니다. "Windows Communication Foundation 비 -Http 정품 인증"을 사용하도록 설정 했으므로 문제가되지 않습니다. 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의 기본 웹 사이트에서 "NetTcpServiceTest"라는 응용 프로그램으로 호스팅됩니다. //localhost/NetTcpServiceTest/MySuperService.svc/mextcp를 나는 다음과 같은 오류 얻을 비주얼 스튜디오 : 내가 net.tcp에 대한 참조를 추가하려고하면

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을 시도하십시오.

관련 문제