views:

260

answers:

1

I have a project ("The Project") that references an external web service. I am then referencing that project in an ASP.Net web application ("The Web Application"). When I reference "The Project" in "The Web Application" the app.config is not copied over, which isn't a problem. Does "The Project" take care of know what endpoint to use? Can the web.config override the endpoint URL? I did a test and am not reference the eternal web service in "The Web Application" and everything seemed to work ok. I guess, can I create the same configuration section, that is in "The Project's" app.config and copy it over to the web.config file to override?

Update: I guess what I really need to find out is how to change the end point of a web service when generating the code from adding a "Web Reference". I tried adding a service reference to my code, but the wsdl is not getting loaded correclty or I am doing something wrong.

Update 2.0: I forgot about the URL property of the proxy that is generated by the web reference.

+2  A: 

By default the web service will use the same URL that was used when creating the web reference. If you want to change it, you can - as you say - copy the contents of the app.config into your web.config.

CodingInsomnia
I needed to update the URL for the proxy and that wasn;t ahppening in my code yet. Thanks!
DDiVita