• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 458
  • Last Modified:

.NET Development With Web Services

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?
1 Solution
Anurag AgarwalPython DeveloperCommented:
Hi Lachmann,

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


Let me know if still you are facing some problem.

lachmannAuthor Commented:
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.
Ted BouskillSenior Software DeveloperCommented:
The problem is the WSDL reference generated by Visual Studio.  I recommend generating your own WSDL wrapper class using this tool: http://msdn.microsoft.com/en-us/library/7h3ystb6(v=vs.80).aspx

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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now