none
Please assist me by telling me what this error means RRS feed

  • Question

  • Hi please i am new to wcf services and i keep getting this error when i run my application: I cannot add service reference to my web site

    System.InvalidOperationException: The contract name 'WeddingPlanningWCFLibrary.
                                  Interfaces.IWeddingPlanningUserProfile' could not be found in the list of contracts implemented by the service 'WeddingPlanningUserProfileService'.
       at System.ServiceModel.Description.ConfigLoader.LookupContract(String contractName, String serviceName)
       at System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress, Boolean skipHost)
       at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, ServiceElement serviceSection)
       at System.ServiceModel.ServiceHost.ApplyConfiguration()
       at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
       at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
       at Microsoft.Tools.SvcHost.ServiceHostHelper.CreateServiceHost(Type type, ServiceKind kind)
       at Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info)

    Saturday, April 12, 2014 2:38 AM

Answers

  • You have a WCF service with a config file.  The contract name 'WeddingPlanningWCFLibrary' isn't properly defined in the config file.

    jdweng

    Saturday, April 12, 2014 3:41 AM
  • Hi,

    >>System.InvalidOperationException: The contract name 'WeddingPlanningWCFLibrary.
     Interfaces.IWeddingPlanningUserProfile' could not be found in the list of contracts implemented by the service 'WeddingPlanningUserProfileService'.

    The error information means that your service contract is not implemented in your WCF Service.

    So maybe the name in the config is mismatch with the your service file.
    Or maybe the[ServiceContract] was missing in your service.

    Also it will better if you can post your service code and config file here.

    Also please try to enable the wcf tracing to find the more error information:

    The following configuration taken from MSDN can be applied to enable tracing on your WCF service.

    <configuration>
      <system.diagnostics>
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true" >
            <listeners>
                 <add name="xml"/>
            </listeners>
          </source>
          <source name="System.ServiceModel.MessageLogging">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
          <source name="myUserTraceSource"
                  switchValue="Information, ActivityTracing">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
        </sources>
        <sharedListeners>
            <add name="xml"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="Error.svclog" />
        </sharedListeners>
      </system.diagnostics>
    </configuration>

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 14, 2014 11:12 AM
    Moderator

All replies

  • You have a WCF service with a config file.  The contract name 'WeddingPlanningWCFLibrary' isn't properly defined in the config file.

    jdweng

    Saturday, April 12, 2014 3:41 AM
  • Hi,

    >>System.InvalidOperationException: The contract name 'WeddingPlanningWCFLibrary.
     Interfaces.IWeddingPlanningUserProfile' could not be found in the list of contracts implemented by the service 'WeddingPlanningUserProfileService'.

    The error information means that your service contract is not implemented in your WCF Service.

    So maybe the name in the config is mismatch with the your service file.
    Or maybe the[ServiceContract] was missing in your service.

    Also it will better if you can post your service code and config file here.

    Also please try to enable the wcf tracing to find the more error information:

    The following configuration taken from MSDN can be applied to enable tracing on your WCF service.

    <configuration>
      <system.diagnostics>
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true" >
            <listeners>
                 <add name="xml"/>
            </listeners>
          </source>
          <source name="System.ServiceModel.MessageLogging">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
          <source name="myUserTraceSource"
                  switchValue="Information, ActivityTracing">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
        </sources>
        <sharedListeners>
            <add name="xml"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="Error.svclog" />
        </sharedListeners>
      </system.diagnostics>
    </configuration>

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 14, 2014 11:12 AM
    Moderator