Question

J'ai un WCF qui a un TCP, HTTP et Mex obligatoire dans un fichier auto-hébergé, et tout fonctionne très bien. Cependant, et je veux migrer vers AppFabric, et de garder les mêmes liaisons, mais je vais avoir beaucoup de mal à le faire. J'ai ajouté le service WCF application, corrigeais le fichier svc, déposez l'application de la console d'auto-hébergement, mais je continue à obtenir le Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http] awfull. Erreur. Quels changements dois-je faire la promotion de mon app.config à mon fichier web.config pour obtenir ce travail? Je ne l'ai pas même essayé de le publier sur IIS, mais ... cette erreur que je reçois est du serveur Web de VS de
Voici mon précédent fichier app.config pour l'auto-hébergement:

<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>

Que dois-je changer?
TKS

Était-ce utile?

La solution

IIS seul ne peut pas non hôte paramètres HTTP. Vous devez également installer (activer la fonction) service d'activation de Windows (WAS). Une fois installé, vous devez activer net.tcp obligatoire pour votre site dans la console de gestion IIS.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top