Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. WCF config Endpoint not found error [modified]

WCF config Endpoint not found error [modified]

Scheduled Pinned Locked Moved WCF and WF
csharpwcfsysadminhelpworkspace
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DeepakMega
    wrote on last edited by
    #1

    I have a wcf server service running fine.. In the "wcf client project" i create a reference to that service and it runs fine.. But when the client has two projects - "wcf client"(ReviewClient) and startup "console project", the "console project" has reference to the wcf client which it calls, it gives an error at the line of creating client Error "Could not find default endpoint element that references contract 'ServiceReferenceReview.IReviewService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element." I tried copying the config file(ReviewClient.dll.config) generated by the "wcf client project"(ReviewClient) to the output of "console project" where ReviewClient.dll is also located, but it still gives the same error. This is my host app.config file

    and this is my wcf client (ReviewClient) config file

    D 1 Reply Last reply
    0
    • D DeepakMega

      I have a wcf server service running fine.. In the "wcf client project" i create a reference to that service and it runs fine.. But when the client has two projects - "wcf client"(ReviewClient) and startup "console project", the "console project" has reference to the wcf client which it calls, it gives an error at the line of creating client Error "Could not find default endpoint element that references contract 'ServiceReferenceReview.IReviewService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element." I tried copying the config file(ReviewClient.dll.config) generated by the "wcf client project"(ReviewClient) to the output of "console project" where ReviewClient.dll is also located, but it still gives the same error. This is my host app.config file

      and this is my wcf client (ReviewClient) config file

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      IComments is no where mentioned in the configuration. Make sure you are adding correct references in the client code.

      D 1 Reply Last reply
      0
      • D dan sh

        IComments is no where mentioned in the configuration. Make sure you are adding correct references in the client code.

        D Offline
        D Offline
        DeepakMega
        wrote on last edited by
        #3

        sorry that error was from a different temporary project i created to check.. It is "ServiceReferenceReview.IReviewService" and not IComments.. Anyway i solved the problem by renaming the config file of wcf client to the console project exe's name.. But this doesn't help in my other project where i need to create a visual studio addin , which uses wcf client to connect to server. In this case the vs addin creates a dll file which further references the wcf client dll file. The problem is the config file of wcf client , i tried remaining it to the vs addin dll's name but it didn't work . The config file should be renamed to the startup project's exe name(which references the wcf client lib).. Here is my projects

        Host
        --WcfReviewService
        --WcfReviewServiceHost - this is host project which references the above service.
        Client
        --ReviewClient - This is wcf client which connects to host.
        --ReviewAddin - VS addin project which references the above client.

        The problem here is where do i put the config file generated from ReviewClient and what name it should be in? There is a way to make a wcf client to work without config file, by programmatically configure the endpoints and interface, but is there any other way?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups