asp.net项目和托管Web服务 [英] asp.net project and hosting web service

查看:60
本文介绍了asp.net项目和托管Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi,
I have a asp.net web application and in the same project, I have added Web Service project that is supposed to check time after every second, and after a certain time supposed to send an email.
My problem is, I do not know how to host and start this service on remote server and when I close my browser, how to make sure that this service keeps working and send emails on certain time.

Thanks

推荐答案

请参阅我之前的回答每1小时后重启一次计算机 [ ^ ]。



您可以将项目.exe添加到 Windows任务管理器然后设置频率和开始时间。
Refer my previous answer Restart computer after every 1 hour[^].

You can add a your project .exe to Windows Task Manager And then set frequency and start time.


I have just discovered that we only need to add Global.asax file (right click project in server explorer and Add New Item>> Add Global Application)
.ust put your email code in the file.  When hosted, it runs through IIS, even though browser is closed.


您可以通过实现自定义模块来实现它

结账以下链接:

运行背景Web应用程序中的服务(在此过程中不涉及Windows服务) [ ^ ]
you can achieve it by implementing custom module
check out below link :
Running a background service in a Web Application (no Windows Service was involved during this process)[^]


这篇关于asp.net项目和托管Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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