2017-10-22 1 views
0

Nach dem Hinzufügen von serviceAuthorization zur Konfigurationsdatei ist ein Problem aufgetreten. Wenn Sie dem Projekt einen Dienst hinzufügen, wird die netTcp-Verbindung nicht angezeigt. Ohne serviceAuthorization funktioniert alles einwandfrei.WCF: Metadaten enthalten eine Referenz, die nicht aufgelöst werden kann: 'net.tcp: // localhost: 8733 /'

Config:

<system.serviceModel> 
 
     <services> 
 
      <service behaviorConfiguration="mexBehavior" name="ChartServices.Service.ChartManagerService"> 
 
      
 
<endpoint address="ChartServices" binding="wsHttpBinding" bindingConfiguration="wsBindingConfig" 
 
       name="wsBinding_UserService" contract="ChartServices.Services_Contract.IUserService" />      
 
<endpoint address="ChartServices" binding="netTcpBinding" bindingConfiguration="netTcpBindingConfig" 
 
       name="netTcp_UserService" contract="ChartServices.Services_Contract.IUserService" />     
 
<endpoint address="mex" binding="mexTcpBinding" name="mexTcp" 
 
       contract="IMetadataExchange" />   
 
<endpoint address="mex" binding="mexHttpBinding" name="mexHttp" 
 
       contract="IMetadataExchange" /> 
 
      <host> 
 
       <baseAddresses> 
 
       <add baseAddress="net.tcp://localhost:8733/" /> 
 
       <add baseAddress="http://localhost:8734/" /> 
 
       </baseAddresses> 
 
      </host> 
 
      </service> 
 
     </services> 
 
     <bindings> 
 
      <wsHttpBinding> 
 
      <binding name="wsBindingConfig"> 
 
       <security mode="Message"> 
 
       <message clientCredentialType="UserName"/> 
 
       </security> 
 
      </binding> 
 
      </wsHttpBinding> 
 
      <netTcpBinding> 
 
      <binding name="netTcpBindingConfig"> 
 
       <security mode="Message"> 
 
       <message clientCredentialType="UserName"/> 
 
       </security> 
 
      </binding> 
 
      </netTcpBinding> 
 
     </bindings> 
 
     <behaviors> 
 
      <serviceBehaviors> 
 
      <behavior name="mexBehavior"> 
 
       <serviceMetadata httpGetEnabled="True"/> 
 
       <serviceDebug includeExceptionDetailInFaults="false" /> 
 
       <serviceCredentials> 
 
       <clientCertificate> 
 
        <authentication certificateValidationMode="PeerTrust" /> 
 
       </clientCertificate> 
 
       <serviceCertificate findValue="RootCATest" storeLocation="LocalMachine" 
 
        storeName="My" x509FindType="FindByIssuerName" /> 
 
       <userNameAuthentication userNamePasswordValidationMode="Custom" 
 
        customUserNamePasswordValidatorType="ChartServices.CustomUserNameValidator, ChartServices" /> 
 
       </serviceCredentials> 
 
       <serviceAuthorization principalPermissionMode="Custom" serviceAuthorizationManagerType="ChartServices.MyServiceAuthorizationManager, ChartServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> 
 
       <authorizationPolicies> 
 
        <add policyType="ChartServices.AuthorizationPolicy, ChartServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /> 
 
       </authorizationPolicies> 
 
       </serviceAuthorization> 
 
      </behavior> 
 
      </serviceBehaviors> 
 
     </behaviors> 
 
     </system.serviceModel>

versucht, verschiedene Optionen, aber könnte das Problem

Antwort

Verwandte Themen