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 Client Reference

WCF Client Reference

Scheduled Pinned Locked Moved WCF and WF
csharpwcfhelpquestionworkspace
5 Posts 2 Posters 7 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.
  • M Offline
    M Offline
    mark_w_
    wrote on last edited by
    #1

    I have a service all working fine. I have a client, say for arguments sake, it has 2 assemblies - View and BLL Now in the BLL i reference the service and expose a wrapper for one of the service methods (it just returns a bool and is called IsAlive()) that the View can see, but the view cant use IsAlive() unless it refereneces the service as well. Is there any way i can get round this? the error i get is System.InvalidOperationException: Could not find default endpoint element that references contract 'xxxxxxxx' 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..

    D 1 Reply Last reply
    0
    • M mark_w_

      I have a service all working fine. I have a client, say for arguments sake, it has 2 assemblies - View and BLL Now in the BLL i reference the service and expose a wrapper for one of the service methods (it just returns a bool and is called IsAlive()) that the View can see, but the view cant use IsAlive() unless it refereneces the service as well. Is there any way i can get round this? the error i get is System.InvalidOperationException: Could not find default endpoint element that references contract 'xxxxxxxx' 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..

      D Offline
      D Offline
      DoctorMick
      wrote on last edited by
      #2

      You shouldn't need to reference the service in your UI but you would need to have the endpoints defined in the config file for your UI. Are you saying that even with the endpoints declared in the UI config it still doesn't work?

      M 1 Reply Last reply
      0
      • D DoctorMick

        You shouldn't need to reference the service in your UI but you would need to have the endpoints defined in the config file for your UI. Are you saying that even with the endpoints declared in the UI config it still doesn't work?

        M Offline
        M Offline
        mark_w_
        wrote on last edited by
        #3

        Thanks for your reply. It does work if i just have the config file. I was kind of hoping not to have to decalare it in the UI. so that other UI's that use the same BLL dont have to know about the config file.

        D 1 Reply Last reply
        0
        • M mark_w_

          Thanks for your reply. It does work if i just have the config file. I was kind of hoping not to have to decalare it in the UI. so that other UI's that use the same BLL dont have to know about the config file.

          D Offline
          D Offline
          DoctorMick
          wrote on last edited by
          #4

          As both the UI and the BLL will run in the same process only one config file will be loaded so you won't get any settings from the BLL config file. You could get around it by creating your own XML file in the BLL which gets deployed with the compiled dll and create the end points etc yourself programatically but that sounds like more trouble than its worth.

          M 1 Reply Last reply
          0
          • D DoctorMick

            As both the UI and the BLL will run in the same process only one config file will be loaded so you won't get any settings from the BLL config file. You could get around it by creating your own XML file in the BLL which gets deployed with the compiled dll and create the end points etc yourself programatically but that sounds like more trouble than its worth.

            M Offline
            M Offline
            mark_w_
            wrote on last edited by
            #5

            I agree, its not worth the hassle. Thanks :)

            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