1

我开发了一个ASP .NET/C# MVC4 application用户可以点击按钮(帖子)的地方,让服务器运行他的算法`。

该过程可能很长(几分钟),如果用户关闭他的窗口/停止加载,服务器将继续运行,并且在我的应用程序中,将数据插入数据库。

我问自己如何stop this server process使用应用程序?我的意思是,if the user realizes he doesn't want to run this process anymore and he likes to stop insertion in database他怎么能那样做?

4

1 回答 1

1

您可以使用将运行和停止您的long process. 在控制器中,您可以执行一些操作,这些操作将通过用户请求来管理此单例。

于 2013-07-24T09:31:06.203 回答