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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:22:00+00:00 2026-05-12T15:22:00+00:00

I have a MOSS 2007 Webpart that displays data obtained from an external webservice

  • 0

I have a MOSS 2007 Webpart that displays data obtained from an external webservice (not originating from sharepoint).

It’s created using VS2009, the webpart project includes a WebReference to my WebService and it uses the following code to make a connection (the url is configured in the WebReference):

    //get xml sitemap from webservice
    MenuService.MenuService service = new MenuService.MenuService();
    service.Credentials = System.Net.CredentialCache.DefaultCredentials;
    XmlNode sitemapRootNode = service.GetSiteMapXML();

I compiled the webpart, deployed it in the BIN folder, everything works fine.

However I cannot change the web service URL… If I want to move the webpart to another environment, I need to recompile the whole thing in order to change the webservice URL

Also, when I compile the webpart projects it creates a webpartname.dll.config file that contains the URL to the webservice… however this config files does nothing. If I change it, or simply delete it from the BIN folder, the webpart still connects to the old URL… URL seems to be hardcoded in the webpart DLL.

Is there a way to configure a webpart so it will look in a config file for its webservice URL?

  • 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-12T15:22:01+00:00Added an answer on May 12, 2026 at 3:22 pm

    The web part runs as a part of the site. It should take these configurations from the site’s web.config, so try inserting the configurations from webpartname.dll.config to web.config file (this takes a little though to maintain the same sections, but isn’t complicated).

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

Sidebar

Related Questions

I'm actually working at MOSS 2007 project where I have to import data from
We have a SharePoint Team Site (WSS 3.0 not MOSS), that includes Tasks list
I have a Sharepoint 2007 MOSS People Search webpart, used with a Paging webpart
I have a MOSS 2007 test site, its not public facing, instead its on
As part of a MOSS 2007 solution, I've got a web part that displays
I'm using MOSS 2007 in my webpart within my CreateChildControls() method I have the
I have created an Anouncement list in MOSS 2007 and I am showing the
I have a standard MOSS 2007 Web Site (MOSS Terminology: Application and a SiteCollection)
In Moss 2007 you have the ability to set the target audience for each
We have a SQUID reverse proxy and a MOSS 2007 portal. All sites are

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.