本文介绍了设置在运行时服务URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我加入了Web引用我们给的地址给ASMX页到Visual Studio。
When I am adding the "Web Reference" we are giving the address to the asmx page to visual studio.
如何能我设置在运行时?
How Can I set this at run time?
推荐答案只需设置对象的Url属性调用任何的服务方法之前:
Just set the Url property of the object before you call any of the service methods:
YourService service = new YourService(); service.Url = "some.other.url/"; // Now you're ready to call your service method service.SomeUsefulMethod();更多推荐
设置在运行时服务URL
发布评论