كانت الخاصية عنوان على ChannelFactory.Endpoint فارغة. يجب أن يكون نقطة النهاية في ChannelFactory في عنوان صالح المحدد

StackOverflow https://stackoverflow.com/questions/1428715

  •  07-07-2019
  •  | 
  •  

سؤال

وأنا على الحصول على الخطأ التالي وأنا لست متأكدا ما أقوم به خطأ. هل ترى أي شخص أي شيء واضح؟ فيما يلي مشروع بلدي الملف web.config وApp.config بلدي مكتبة فئة WCF في

<اقتباس فقرة>   

والخاصية عنوان على   كان ChannelFactory.Endpoint فارغة. ال   يجب أن يكون نقطة النهاية ChannelFactory في ل   صحيح عنوان محدد.

وAPP.CONFIG على الخادم (IN MY الدرجة LIBRARY)

<system.serviceModel>
    <services>
      <service behaviorConfiguration="Default" name="Trezoro.WebAPI.Trade.TradeService">
        <endpoint address="" behaviorConfiguration="WebEPBehavior" binding="webHttpBinding" 
          contract="ITradeService" name="WebHttpBinding_ITradeService" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8080/tradeservice/" />
          </baseAddresses>
        </host>
      </service>
      <service behaviorConfiguration="Default" name="Trezoro.WebAPI.Authentication.AuthService">
        <endpoint address="" behaviorConfiguration="WebEPBehavior" binding="webHttpBinding" 
          contract="IAuthService" name="WebHttpBinding_IAuthService" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8081/authservice" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="WebEPBehavior">
          <webHttp />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="Default">
          <serviceMetadata httpGetEnabled="True" />
          <serviceDebug includeExceptionDetailInFaults="True" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

وWeb.config في PROJECT WEB

<system.serviceModel>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />

    <bindings>
       <customBinding>
          <binding name="WebHttpBinding_IAuthService">
             <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
                messageVersion="Soap12" writeEncoding="utf-8">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                   maxBytesPerRead="4096" maxNameTableCharCount="16384" />
             </textMessageEncoding>
          </binding>
          <binding name="WebHttpBinding_ITradeService">
             <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
                messageVersion="Soap12" writeEncoding="utf-8">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                   maxBytesPerRead="4096" maxNameTableCharCount="16384" />
             </textMessageEncoding>
          </binding>

       </customBinding>
    </bindings>
        <client>
   <endpoint binding="customBinding" bindingConfiguration="WebHttpBinding_IAuthService"
    contract="IAuthService" name="WebHttpBinding_IAuthService" />
   <endpoint binding="customBinding" bindingConfiguration="WebHttpBinding_ITradeService"
    contract="ITradeService" name="WebHttpBinding_ITradeService" />
  </client>
    </system.serviceModel>
هل كانت مفيدة؟

المحلول

ونقطة النهاية العميل يفتقد عنوان.

نصائح أخرى

وفقط إضافة سمة عنوان للوسم نقطة النهاية في جانب العميل (المستهلكة النهاية).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top