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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:22:30+00:00 2026-06-11T04:22:30+00:00

I added a .NET 2.0 web reference with the Visual Studio IDE, but for

  • 0

I added a .NET 2.0 web reference with the Visual Studio IDE, but for this specific case it can’t be configured using the app.config file.

So I tried to initialize it this way:

var service = new MyWebservice
{
   Url = config.MyWebserviceUrl
};

But I get the following exception:

Value cannot be null. Parameter name: uriString

config.MyWebserviceUrl contains a valid web address.

What is the correct way to configure and initialize a webservice programatically?

  • 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-11T04:22:32+00:00Added an answer on June 11, 2026 at 4:22 am

    Have you checked the URL Behavior setting for the web reference? If it’s Dynamic, it will be attempting to get the URL from the config file.

    This question covers programmatic configuration of the URL in more detail:

    How can I dynamically switch web service addresses in .NET without a recompile?

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

Sidebar

Related Questions

In Visual Studio I just added a web service reference to my Asp.net website,
I am using the Visual Studio Publish Web screen to publish my ASP.Net to
I have Visual Studio 2010, using c# and I want to add this web
I am building a web service client using .NET Visual Studio 2010 by adding
I've added a WCF service reference to a .NET project using this WSDL: https://interop.cmiservices.org/axis/services/CAP1_1?wsdl
I've made a simple .NET 4 Web Application in VS2010, and added a reference
I'm trying to catch this exception: System.ServiceModel.EndpointNotFoundException But visual studio isn't finding it. There's
I have a webservice - called MyCompany.WebService1 I reference this using a web reference
I have added a service reference to my asp.net web application (originally it was
I'm trying to set up a .NET 3.5 web service project in Visual Studio.

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.