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

  • SEARCH
  • Home
  • 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 4002974
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:05:45+00:00 2026-05-20T08:05:45+00:00

I have a SharePoint workflow which calls a WCF service. This works fine so

  • 0

I have a SharePoint workflow which calls a WCF service. This works fine so long as the workflow runs under IIS and is not shifted to the Timer Service.

The problem is that the Timer Service does not have access to the web.config settings it needs to setup the WCF connection from the context of the Timer Service.

Could not find endpoint element with name endpointname' and contract 'servicecontractname' in the ServiceModel client configuration section

I am setting up all the info WCF needs to make the connection in code anyway (and overriding the values set in web.config)

My question is, can I bypass this config entirely? I’d rather not be dependent on several ettings files and keeping them in sync.

Update
This little bit of code did the trick.

string address = "http://myservice.com/soap.svc";
Binding binding = new System.ServiceModel.BasicHttpBinding();
EndpointAddress endpointAddress = new EndpointAddress(address);
client = new MyServiceClient(binding, endpointAddress);

Thanks for the input!

  • 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-05-20T08:05:46+00:00Added an answer on May 20, 2026 at 8:05 am

    Sure – you can do all configuration in code.

    Uri tcpBaseAddress = new Uri("net.tcp://localhost:8000/");
    
    ServiceHost host = new ServiceHost(typeof(MyService),tcpBaseAddress);
    
    Binding tcpBinding = new NetTcpBinding( );
    
    //Use base address as address
    host.AddServiceEndpoint(typeof(IMyContract),tcpBinding,"");
    //Add relative address
    host.AddServiceEndpoint(typeof(IMyContract),tcpBinding,"MyService");
    //Ignore base address
    host.AddServiceEndpoint(typeof(IMyContract),tcpBinding,
       "net.tcp://localhost:8001/MyService");
    
    host.Open( );
    

    http://en.csharp-online.net/WCF_Essentials%E2%80%94Programmatic_Endpoint_Configuration

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a workflow created in Sharepoint designer that works fine when manually triggered.
I have modified a SharePoint visual studio workflow which works as per requirement on
I have a SharePoint workflow which is running whenever the item changes . The
I have created a SharePoint workflow in visual studio , I have extended this
I have a custom content type in SharePoint which has an approval workflow associated
in moss 2007 service pack 2 i have designed a sharepoint designer looping workflow
I have a complex workflow, written in VS2010 (not sharepoint designer) for Sharepoint 2010.
I have generated a C# SharePoint Sequential Workflow project using the very handy STSDEV
I have a state machine workflow hosted in SharePoint with a delay activity in
I have a SharePoint workflow with a SendEmail activity. I use the MethodInvoking event

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.