2011-03-18 4 views
1

자체 호스트 파일에 TCP, HTTP 및 Mex 바인딩이있는 WCF가 있습니다. 모든 것이 잘 작동합니다. 그러나 AppFabric으로 이전하고 동일한 바인딩을 유지하려고하지만 매우 힘든 시간을 보내고 있습니다. WCF 서비스 응용 프로그램을 추가하고 svc 파일을 수정하고 자체 호스팅 콘솔 응용 프로그램을 삭제했지만 awfull이 계속 나타납니다 Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]. 오류. 이 기능을 사용하려면 내 app.config에서 web.config 파일로 어떤 내용을 변경해야합니까? 난 IIS에 게시하려고 아직하지 않은 ... 내가 갖는이 오류가
아래는 자기 호스팅은 내 이전 app.config 파일입니다 VS의 웹 서버에서이다 :자체 호스팅에서 IIS/AppFabric 호스팅으로 WCF 포팅

<configuration> 
    <system.serviceModel> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> 
     <bindings> 
     <basicHttpBinding> 
      <binding name="SimpleBinding" /> 
     </basicHttpBinding> 
     <netTcpBinding> 
      <binding name="DefaultTCPBinding" closeTimeout="01:00:00" receiveTimeout="01:00:00" 
       sendTimeout="01:00:00" transactionFlow="true" transactionProtocol="OleTransactions" 
       maxBufferSize="5242880" maxReceivedMessageSize="5242880"> 
      <reliableSession inactivityTimeout="01:00:00" /> 
      </binding> 
     </netTcpBinding> 
     <wsHttpBinding> 
      <binding name="RSAlarmEvent" closeTimeout="00:01:00" openTimeout="00:01:00" 
       receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 
       transactionFlow="false" hostNameComparisonMode="StrongWildcard" 
       maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
       messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 
       allowCookies="false"> 
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
       maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
      <reliableSession ordered="true" inactivityTimeout="00:10:00" 
       enabled="false" /> 
      <security mode="Message"> 
       <transport clientCredentialType="Windows" proxyCredentialType="None" 
        realm="" /> 
       <message clientCredentialType="Windows" negotiateServiceCredential="true" 
        algorithmSuite="Default" /> 
      </security> 
      </binding> 
     </wsHttpBinding> 
     <webHttpBinding> 
      <binding name="ScriptBindig" crossDomainScriptAccessEnabled="true" /> 
     </webHttpBinding> 
     </bindings> 
     <behaviors> 
     <endpointBehaviors> 
      <behavior name="WebScriptBehavior"> 
      <enableWebScript /> 
      </behavior> 
     </endpointBehaviors> 
     <serviceBehaviors> 
      <behavior name="MetadataBehavior"> 
      <serviceMetadata httpGetEnabled="true" httpGetBinding="webHttpBinding" 
        httpGetBindingConfiguration="" /> 
      <serviceDebug includeExceptionDetailInFaults="true" /> 
      <serviceThrottling maxConcurrentCalls="64" maxConcurrentSessions="400" 
        maxConcurrentInstances="464" /> 
      </behavior> 
     </serviceBehaviors> 
     </behaviors> 
     <services> 
     <service behaviorConfiguration="MetadataBehavior" name="MyServer.Implementation.MyAppImplementation"> 
      <endpoint address="" binding="netTcpBinding" bindingConfiguration="DefaultTCPBinding" 
       name="MyAppTCPEndpoint" contract="MyServer.Interfaces.IMyApp" /> 
      <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" 
       name="MyAppMex" contract="IMetadataExchange" /> 
      <endpoint address="ws" behaviorConfiguration="" binding="basicHttpBinding" 
       bindingConfiguration="SimpleBinding" name="MyApp" contract="MyServer.Interfaces.IMyApp" /> 
      <host> 
      <baseAddresses> 
       <add baseAddress="net.tcp://desk01:9878/MyAppService" /> 
       <add baseAddress="http://desk01:9876/MyAppService/" /> 
      </baseAddresses> 
      </host> 
     </service> 
     </services> 
     <diagnostics> 
     <messageLogging logEntireMessage="true" 
         logMalformedMessages="true" 
         logMessagesAtTransportLevel="true" /> 
    </diagnostics> 
    </system.serviceModel> 
</configuration> 

무엇을 변경해야합니까?
Tks

답변

3

IIS만으로는 HTTP 종단점을 호스팅 할 수 없습니다. Windows 정품 인증 서비스 (WAS)도 설치 (활성화)해야합니다. 설치가 끝나면 IIS 관리 콘솔에서 사이트의 net.tcp 바인딩을 활성화해야합니다.

+0

예, 알고 있습니다. AppFabric을 WAS 및 전체 9 야드와 함께 설치했습니다. 그러나이 오류는 Visual Studio의 서버를 사용하여 디버깅하는 동안 여전히 발생합니다. 나는 아직 IIS가 아니다. – Pascal

+1

Net.Tcp를 사용하려면 IIS에 있어야합니다. VS 통합 웹 서버 (Cassini)는 HTTP 끝점 만 지원합니다. –

+0

몰랐습니다 ... : -/Tks 시간과 답변을! 내가 tcp 물건을 제거하고, 그것은 작동 ... 나는 AppFabric 그것을 어떻게 시도 볼 수 있습니다. – Pascal

관련 문제