.NET核心中的窗口服务 [英] Window service in .NET core

查看:72
本文介绍了.NET核心中的窗口服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找C#语言的以下解决方案:

I am looking for the following solutions in C# language:

1。我试图找到一个示例代码或应用程序如何使用C#在.NET核心中开发窗口服务。


1. I am trying to find a sample code or application how to develop a window service in .NET core using C#.

2。是否可以将以前.NET版本中编写的现有窗口服务迁移到.NET核心?

2. Is it possible to to migrate the existing window service written in previous .NET version to .NET core?

3。通过在C#中使用

3. what are the best way to transfer files(JSON file) from one server to another server at a particular time in the day by using

窗口服务,在一天中的特定时间将文件(JSON文件)从一台服务器传输到另一台服务器的最佳方法是什么?

window service in C#?




推荐答案

1。我试图找到一个示例代码或应用程序如何使用C#在.NET核心中开发窗口服务。

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/windows-service ?view = aspnetcore-2.1

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/windows-service?view=aspnetcore-2.1

它就像你现在得到的那样接近。

it's as close as you're going to get at this time.

<强> 2。是否可以将以前.NET版本中编写的现有窗口服务迁移到.NET核心?

这取决于代码的作用,如一些名称空间非.Core框架可能在Core中折旧。

It depends on what the code is doing, as some namespaces non .Core framework may be depreciated in Core.

3。使用

自我托管WCF服务,在一天中的特定时间将文件(JSON文件)从一台服务器传输到另一台服务器的最佳方法是什么? TCP / IP或使用Window服务托管WCF服务。 Json只是字符串数据。 

Selfhosting WCF service over TCP/IP or host the WCF service using the Window service. Json is just string data. 


这篇关于.NET核心中的窗口服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆