简体   繁体   English

从文本文件C#NAV中读取Web服务URL

[英]Reading Web Services URLs from a text file C# NAV

I am using Microsoft Dynamics NAV 2009 as I am building a C# program as the integration. 我正在使用Microsoft Dynamics NAV 2009,因为我正在构建一个C#程序作为集成。 Currently Im defining all my web service references inside my C# code. 目前我在我的C#代码中定义了所有的Web服务引用。

I wanted to know whether I can call the web service references from a text file since I will be using different URLs with different domains. 我想知道是否可以从文本文件中调用Web服务引用,因为我将使用具有不同域的不同URL。 Currently Im running on localhost. 目前我在localhost上运行。

If you want to avoid the hard-coded URLs that were created when you set the reference to the web service - you certainly can. 如果要避免在设置对Web服务的引用时创建的硬编码URL,您当然可以。 Your web service proxy has a Url property that you could populate with an alternative web service URL, eg one read from a text or config file, prior to the actual web service call. 您的Web服务代理具有Url属性,您可以在实际Web服务调用之前填充备用Web服务URL,例如从文本或配置文件中读取的URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM