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 8457235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:45:34+00:00 2026-06-10T12:45:34+00:00

I want to update web reference Url in web.config applicationSettings at runtime Here is

  • 0

I want to update web reference Url in web.config applicationSettings at runtime

Here is web config application settings

<applicationSettings>
<ItineraryBuilder.Properties.Settings>
  <setting name="ItineraryBuilder_SchedulesConnectionsService_SchedulesConnectionsService"
    serializeAs="String">
    <value>http://www.pathfinder-xml.com/soap/*/services/SchedulesConnections</value>
  </setting>
  <setting name="ItineraryBuilder_SalesForceService_SforceService"
    serializeAs="String">
    <value>https://login.salesforce.com/services/Soap/c/25.0/0DFd00000000Wa6</value>
  </setting>
  <setting name="ItineraryBuilder_OAGService_CBWSPublicService"
    serializeAs="String">
    <value>http://ondemand.oag.com:80/CBWebServicePublic/CBWSPubliclPort</value>
  </setting>
</ItineraryBuilder.Properties.Settings>
</applicationSettings>

here is my code using to update

var configuration = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
var section = (System.Configuration.ClientSettingsSection)configuration.GetSection("applicationSettings/ItineraryBuilder.Properties.Settings");

System.Configuration.SettingValueElement sv = new System.Configuration.SettingValueElement();
sv.Equals("https://test.salesforce.com/services/Soap/c/25.0/0DFd00000000Wa6");
section.Settings.Get("ItineraryBuilder_SalesForceService_SforceService").Value = sv;
configuration.Save();

But it does not update Value, instead remove Value tag from settings

Earlier i was trying to update Web service url, but did not work so i follow this approach, will you please guide me on how to update web service url?

this is what i was doing

SforceService sf = new SforceService();
sf.Url = "test.salesforce.com/services/Soap/c/25.0/0DFd00000000Wa6";;

Please help.

  • 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-10T12:45:35+00:00Added an answer on June 10, 2026 at 12:45 pm

    Thanks Amiram Korach for all you help

    With his help i got what i was doing wrong.

    As he suggested there is no need to update web config as it is not a good approach and so the solution for the above problem is updating Web reference at runtime and so the following code works fine

    SforceService sf = new SforceService();
    sf.Url = "test.salesforce.com/services/Soap/c/25.0/0DFd00000000Wa6"
    

    what i was doing wrong, the “sf” was not passed to API class which is used in creating connection. Amiram Korach helped me finding this issue.

    Thanks again.

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

Sidebar

Related Questions

I want to update an ASP .NET web application (including web.config file changes and
I have a web service on my c# application. I want to update webservice
I want to implement a Facebook updates(user action and notifications) on my web application
I am developing a php web site. Here I want to display twitter updates
i have ios application with xcdatamodeld, i want update some data so need a
I have developed a windows forms c# application, i just want update items in
Is there a way to update web reference in a Visual Studio 2008 project
I want to simulate the Right click/Update service reference command in a VS2010 addin.
i want update textarea content onclock on a input button for example: <input type=button
What I want: Update all new commits from server with my local repository in

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.