.NET Development With Web Services

Posted on 2011-04-27
Last Modified: 2012-05-11
This is a general .NET problem that I have when I work projects that include .NET Web Services.

In my development environment I have an ASP.NET Web Application project  with a simple Web Service that gets something from a database.
Also in my development environment I have a VB.NET SmartDevice application and I add a web reference to the above web service.

I work in my Dev environment and all Is well.

When It comes time to move my Web Service and corresponding SmartDevice client  that consumes the Web Service, what do I need to modify so that the client knows the new address of the Web Service without re-adding the Web Reference and recompiling in Visual Studio?
Question by:lachmann
    LVL 11

    Expert Comment

    Hi Lachmann,

    I think what you are looking for is explained in this article

    Let me know if still you are facing some problem.


    Author Comment

    This is close, but my project that consumes the Web Service is a Windows MObile Smartdevice application and I don't have a web.config in this type of project. And I don't see any other area where the dynamic URL is located.

    So perhaps the question here is how the Smartdevice application uses the 'URL Behavior' setting and where it locates the URL when it is set to dynamic.
    LVL 51

    Accepted Solution

    The problem is the WSDL reference generated by Visual Studio.  I recommend generating your own WSDL wrapper class using this tool:

    Then you can modify the code to dynamically set the URL for the web service to be consumed.  All you have to do is make sure the namespace is the same in both environments.  The namespace does NOT have to match the URL.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now