需要有关创建Windows服务的帮助 [英] Need help on creating Windows service

查看:97
本文介绍了需要有关创建Windows服务的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我需要一些帮助来创建Windows服务。我可以给我的senario所以如果有人可以帮助我创建Windows服务,我非常感谢帮助。



1.在一个目录中查看触发器文件(例如C :\ TriggerFiles \\)。

如果文件存在则

A.)从另一个服务器中提取另一个文件并存储在另一个目录中

我们结束。

B.)如果从(A)读取文件有任何错误,则向特定的

组发送警告信息。

C.)成功拉动文件(A),运行SSIS并从

文件加载数据。

D.)SSIS成功加载后,需要删除文件(1.)



E.)将文件从(A)移动到另一个Archieve目录。



所以这是我完整的服装。请有人帮我。



谢谢,

杰克

解决方案

< blockquote>要观看文件,您需要使用推送方法,而不是轮询。请参阅:

http://en.wikipedia.org/wiki/Push_technology [< a href =http://en.wikipedia.org/wiki/Push_technologytarget =_ blanktitle =New Window> ^ ],

http://en.wikipedia.org/wiki/Pull_technology [ ^ ]。



要使用.NET执行此操作,您可以使用类 System.IO.FileSystemWatcher

http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx [ ^ ]。



学习Windows Service应用程序开发,从这里开始: http:// msdn.microsoft.com/en-us/library/y817hyb6.aspx [ ^ ]。



祝你好运,

-SA

Hello,
I need some help to create windows service. I can give my senario so if somebody can help me on to create windows service, I really appreciate help.

1. Watch for trigger file in one directory (e.g. C:\TriggerFiles\\).
If file is exists then
A.) Pull another file from different server and store in another directory at
our end.
B.) If any error in reading file from (A) then send alert message to particular
group.
C.)On success of pulling file on (A), run the SSIS and load the data from the
file.
D.) After SSIS successfully load, need to remove the file from (1.)

E.) Move the file from (A) to another "Archieve" directory.

So here is my complete senario. Please anybody can help me on that.

Thanks,
Jack

解决方案

For watching the files, you need to use push approach, not polling. Please see:
http://en.wikipedia.org/wiki/Push_technology[^],
http://en.wikipedia.org/wiki/Pull_technology[^].

To do this with .NET, you can use the class System.IO.FileSystemWatcher:
http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx[^].

To learn Windows Service application development, start here: http://msdn.microsoft.com/en-us/library/y817hyb6.aspx[^].

Good luck,
—SA


这篇关于需要有关创建Windows服务的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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