简体   繁体   English

用于发送,接收和运行.exe的简单Azure C#服务器

[英]Simple Azure C# Server for sending, receiveng and running .exe

Here is my case: 这是我的情况:

  • Azure Cloud Azure云
  • MS VS 2013 微软VS 2013
  • Old Fortran .exe for some computations - let's call it solver with plain text files for input and output. 用于某些计算的旧Fortran .exe-我们称其为具有纯文本文件的输入和输出求解器。

I configured virtual machine in Azure for executing solver.exe. 我在Azure中配置了用于执行Solver.exe的虚拟机。 Now i want to develop simple client and server apps with C# or any other language/tool from MS stack to use in this scenario: 现在,我想使用C#或MS堆栈中的任何其他语言/工具来开发简单的客户端和服务器应用程序,以在这种情况下使用:

  • Client sets some settings, generates files and sends them to the virtual machine in the cloud. 客户端设置一些设置,生成文件并将其发送到云中的虚拟机。
  • Server receives this data, runs solver.exe and sends some results back. 服务器接收此数据,运行Solver.exe并将一些结果发送回。
  • Client saves results on local machine. 客户端将结果保存在本地计算机上。

So what do I use to write server - C# or some script language? 那么,我该如何编写服务器-C#或某些脚本语言? Should I write file transfer from the scratch? 我应该从头开始写文件传输吗? Any links to relevant guidelines are welcome. 欢迎链接到相关指南。

The best you can do is create a service using WCF (Windows Communication Foundation). 最好的办法是使用WCF(Windows Communication Foundation)创建服务。

Here some useful links: 这里有一些有用的链接:

http://blogs.msdn.com/b/brunoterkaly/archive/2013/10/18/getting-started-with-wcf-windows-communication-foundation-running-and-debugging-quickly.aspx http://blogs.msdn.com/b/brunoterkaly/archive/2013/10/18/getting-started-with-wcf-windows-communication-foundation-running-and-debugging-quickly.aspx

Then to consume your service, just create a console application for example and add a service reference to your wcf service. 然后,要使用您的服务,只需创建一个控制台应用程序,然后向wcf服务添加服务引用即可。

http://msdn.microsoft.com/en-us/library/bb628652.aspx http://msdn.microsoft.com/en-us/library/bb628652.aspx

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

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