我正在编写一个应用程序,该应用程序会在很长一段时间内从 MS AX Dynamics 获取数据。
AX(或我工作的公司)的问题是 AX 不允许跨域连接。
目前,我们的 Active Directory (AD) 上有 2 个域country1.company.com 和country2.company.com,应用程序旨在在这两个域上运行,但 AX 位于country1.company.com 上。事实上,所有国家/地区 2 在需要在 AX 上工作时都使用 RDP 到国家/地区 1,但考虑到我们的地理距离,速度非常慢。
为了克服这个问题,我正在考虑编写一个在country1运行的单独(控制台)程序,以便用户可以将数据发送给它并让它查询AX并通过网络返回结果。
最大的问题是:
我是否必须像客户端服务器一样编写应用程序,或者我可以利用现有的 Windows 功能来实现相同的功能吗?由于我的网络编程经验为零,我希望我不必走这条路......提前感谢您的任何建议。
I am writing an application that fetches data from MS AX Dynamics once-in-a-very-long-while
The issue with AX (or with the company I am working for) is that AX does not allow cross domains connections.
Currently, we have 2 domains country1.company.com and country2.company.com on our Active Directory (AD) and the application is intended to run on both domains but AX is on country1.company.com. In fact, all country2 users RDP to country1 when they need to work on AX and it is terribly slow given our geographic distances.
To overcome this problem, I am thinking of writing a separate (console) program that runs at country1 such that users can send the data to it and let it query AX and return the results over the network.
The big question is:
Do I have to write the application like a client server thing or can i ride on existing windows features to acheive the same thing? Since I have zero network programming experience, I hope I dont have to go that way.... thanks in advance for any suggestions.
发布评论
评论(2)
您应该使用 WCF 类。是的,它是网络,但任何与其他计算机通信的东西都是网络。您可能想要设置一个 WCF Web 服务这种特征。这是一个很好的入门应用程序示例。
Instead of writing a console app and sockets, you should make use of WCF classes. Yes, it is networking, but anything that talks to any other computer is. You probably want to set up a WCF web service for this kind of feature. Here's a nice starter app as an example.
您可以使用 thrift 链接。
它可以实现跨编程语言的高效、可靠的通信,并且.
您只需在 IDL 文件中定义数据结构和服务接口即可。 链接
然后使用 thrift 编译器以支持的编程语言之一生成 RPC 和数据序列化代码由您选择。
这样您就具备了序列化数据和 RPC 所需的基础设施。现在您可以只专注于您的业务逻辑。
PS:但这不是 Windows 功能。
You can use thrift Link.
It enables efficient and reliable communication across programming languages and also .
You just need to define the data structures and service interface in an IDL file. Link
Then use the thrift compiler to generate the RPC and data serialization code in one of the supported programming language of your choice.
With that you are equipped with the infrastructure needed for serializing your data and RPC. Now you can just focus on your business logic.
P.S: This is not a windows feature though.