I have a class library (DLL) that references a web service. This DLL is
referenced by web applications. The problem is, I need to reference a
development, test, or production version of the web service depending on
whether I'm in the development, test, or production environment. Is there
a
way to dynamically change which version is referenced?
I found an article at Microsoft
(http://msdn2.microsoft.com/en-us/library/5k10s063(VS.80).aspx) that
describes how to do this if the web app references the web service
directly,
but I can't figure out how to make it work when it's the DLL that
references
the web service.
So is this even possible? Am I missing something obvious? I'm kind of a
web service novice.
If you have a class library, then you probably have a class that references
the web service. Let the class expose a property which is the URL of the
service to reference. The consumers of the class library can set this
property before calling on methods that require the web service. The callers
should probably get the URL to use from a settings file.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Custom classes with web services ... I also have a Windows app that will reference a couple of web services. ... Each web service references the .dll to get the user class. ... (microsoft.public.dotnet.framework.aspnet.webservices)
Re: Path to Class Library ... copy the dll (and all dll's it references) to the bin folder of the ... | I've recently created a web service, which uses code within a class ... | shared code libraray DLL?... (microsoft.public.dotnet.framework.aspnet)
RE: Custom classes with web services ... What you are experiencing is the automatic behavior of the generated proxy.... As far as changing your web service, this is possibly an area that you want ... >Both the Windows app and the Webservices will use this User class.... >Each web service references the .dll to get the user class. ... (microsoft.public.dotnet.framework.aspnet.webservices)
RE: Frustrating Build Error... ... Your statement about the project references is correct. ... All of the related assemblies exist in the web service project's bin ...Microsoft Online Community Support... where an initial response from the community or a Microsoft Support... (microsoft.public.dotnet.general)
Re: Deploy All Dependent Files ... To learn why Publish isn't getting all the second-level references would require study of the MSBUILD output, and I doubt I'll have enough time this week. ... Look in the output from the build of your web service project for calls to your VB project and see if you can see a step being skipped, or some other reason why not all of the references are gathered or copied. ... Web Service Application - I understand that references in this project will populate, but I have another project in the same solution, which is a set of VB.Net classes (so another project, another DLL, but in the same solution). ..."John Saunders" wrote in message ... (microsoft.public.dotnet.framework.webservices)