Monday 19 August 2013

Service 'WCFService1.Service1' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.

Server Error in '/Rack' Application.


Service 'WCFService1.Service1' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Service 'WCFService1.Service1' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Solution:-
              Check The Name Of The behaviorConfiguration Of The <Service>tag In The Web.Config Is Same As The Project Name (i.e., Project Namespace) 

<services>
                  <service name="WcfService1.Service1" behaviorConfiguration="WcfService1.Service1Behavior">
                        <!-- Service Endpoints -->
                        <endpoint address="" binding="wsHttpBinding" contract="WcfService1.IService1">
                            
                              <identity>
                                    <dns value="localhost"/>
                              </identity>
                        </endpoint>
                        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
                  </service>

            </services>

2 comments :

  1. Thanks a lot Chaitanya, this was exactly what was causing the issue for my web service on shared hosting.

    Cheers..!!!!

    ReplyDelete

Note: only a member of this blog may post a comment.