0

My wcf service was working until I made two changes. When I run it in debug mode I get no errors but when I deploy it to production I get the "No End Point" exception. I've followed the advise given in other posts but no change. Can anyone help me sort this out?

1. Added a method that accepts a string and a byte array


Function method3(ByVal parameter1 As String, ByVal parameter2 As Byte()) As String


2. Added a section to the web.config so larger messages could be sent

<bindings>
  <basicHttpsBinding>
    <binding maxReceivedMessageSize="2100000000"></binding>
  </basicHttpsBinding>
</bindings>

WCF Service Configuration

  <system.serviceModel>
    <bindings>
      <!--This needs to be changed to http if debugging and https for production-->
      <!--<basicHttpBinding>
        <binding maxReceivedMessageSize="2100000000"></binding>
      </basicHttpBinding>-->
      <basicHttpsBinding>
        <binding maxReceivedMessageSize="2100000000"></binding>
      </basicHttpsBinding>
    </bindings>
    <services>
      <service name="penergydata.penergydata">
        <host>
          <baseAddresses>
            <!--This needs to be changed to http if debugging and https for production-->
            <!--<add baseAddress="http://localhost:49427/"/>-->
            <add baseAddress="https://wcfservices.myefaactweb.com/penergydata/"></add>
          </baseAddresses>
        </host>
        <!--This needs to be changed to http if debugging and https for production-->
        <!--<endpoint address="" binding="basicHttpBinding" contract="penergydata.Ipenergydata"/>-->
        <endpoint address="" binding="basicHttpsBinding" contract="penergydata.Ipenergydata"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="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>
    <protocolMapping>
      <!--This needs to be changed to http if debugging and https for production-->
      <!--<add binding="basicHttpBinding" scheme="http"/>-->
      <add binding="basicHttpsBinding" scheme="https"/>
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
  </system.serviceModel>

Client Configuration

<system.serviceModel>
 <bindings>
  <basicHttpBinding>
   <binding name="BasicHttpsBinding_Ipenergydata">
    <security mode="Transport"/>
   </binding>
  </basicHttpBinding>
 </bindings>
 <client>
  <endpoint address="https://wcfservices.myefaactweb.com/penergydata/penergydata.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpsBinding_Ipenergydata" contract="penergydata.Ipenergydata" name="BasicHttpsBinding_Ipenergydata"/>
 </client>
</system.serviceModel>
  • There is no "the" No End Point exception, it can have multiple causes. Read [ask] and [mcve], post the error in full, as well as what exactly you tried to resolve it. – CodeCaster May 26 '17 at 15:02

1 Answers1

0

Make sure you change your binding type in your client. The client and service bindings have to match. You can always use svcutil to get the correct config info for a service as well.

<system.serviceModel>
    <bindings>
        <basicHttpsBinding>
            <binding name="BasicHttpsBinding_Ipenergydata">
                <security mode="Transport"/>
            </binding>
        </basicHttpsBinding>
    </bindings>
    <client>
        <endpoint address="https://wcfservices.myefaactweb.com/penergydata/penergydata.svc" binding="basicHttpsBinding" bindingConfiguration="BasicHttpsBinding_Ipenergydata" contract="penergydata.Ipenergydata" name="BasicHttpsBinding_Ipenergydata"/>
    </client>
</system.serviceModel>
Popo
  • 2,402
  • 5
  • 33
  • 55