Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8346125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:54:36+00:00 2026-06-09T06:54:36+00:00

I have created a class library that should connect to a WCF endpoint project

  • 0

I have created a class library that should connect to a WCF endpoint project I am hosting.
The client project has commandlets defined that should interact with the service.

However, I keep getting the following error:

     Could not find default endpoint element that references contract Service1.MyService 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.

Do you know what the problem might be?

EDIT
What I have is a single Class Library defining cmdlets. I use an .psd1 file to Import-Module which uses the dll files produced.

EDIT2
Once again, I don’t have a project referencing my library. It is the powershell that calls the commandlets defined and these cmdlets should connect to the WCF endpoint

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:54:39+00:00Added an answer on June 9, 2026 at 6:54 am

    have got this to work: here is a clean solution:

    internal static class ServiceClass
    {
    
        internal static Object GetWCFSvc(string siteUrl)
        {
    
            Uri serviceUri = new Uri(siteUrl);
            EndpointAddress endpointAddress = new EndpointAddress(serviceUri);
    
            //Create the binding here
            Binding binding = BindingFactory.CreateInstance();
    
            ServiceClient client = new ServiceClient(binding, endpointAddress);            
            return client;
        }
    
    
    }
    
    internal static class BindingFactory
    {
        internal static Binding CreateInstance()
        {
            BasicHttpBinding binding = new BasicHttpBinding();
            binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
            binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
            binding.UseDefaultWebProxy = true;
            return binding;
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a class library as a project. Where I have added a
I have created a class library (assembly) that provides messaging, email and sms. This
I have a signed class library that I want to create assemblies for via
I have created a class library called AddServiceLibrary in which I have a method
I have created a Class Library (Core Processing Component) using C# in Visual Studio
I am using the apache library. I have created a class which sends a
I have a class library that I have written in C#.net. I want to
In Visual Studio 2008 I have a Class Library project (called Media ) to
I've created a small Class Library, with a HttpModule that uses a filter to
i have created a com class library with vb.net. i have registered the dll

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.