开发者

Web Reference Endpoint URL and configuration question (Asp.Net)?

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 Applicat开发者_StackOverflow中文版ion" 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜