在c#桌面应用程序中取消当前的webmethod访问权限??? [英] Cancel the current webmethod access in c# Desktop Application???

查看:45
本文介绍了在c#桌面应用程序中取消当前的webmethod访问权限???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

正在使用Web服务与瘦客户机桌面应用程序一起使用金融资本市场".

随着数据库的不断完善,我们允许客户通过我们开发的查询分析器模块查询数据库,以获取他们需要的必要数据.

因此,我们正在从查询分析器模块中形成sql查询,并通过Web方法发送要在数据库中执行的字符串.

平均查询需要花费几秒钟的时间来执行并返回数据集.如果查询具有复杂的JOINS,则返回大量数据可能需要花费几分钟的时间来执行.

让我们假设,一个客户执行一个复杂的查询并等待结果,在这期间,如果他想取消查询执行,我需要在表单中提供一个取消"按钮..

我需要做的是取消该过程并取消该Web请求并使该应用程序处于空闲状态.


请帮我.提出想法.

提前谢谢.
Peer Mohamed Mydeen.

Hello All,

Am working with the thin client desktop application for "FINANCE CAPITAL MARKETS" using Web services.

As we are keeping database with our end, we are allowing clients to query our database through a query analyzer module which is developed by us, to get required data of theirs need.

So we are forming sql query from our query analyzer module and sending the string to execute in database via web method.

An average query make take several seconds to execute and return dataset. In case of queries having complicated JOINS, which returns huge amount of data may take several minutes to execute.

Let us assume, a client executing a complicated query and waiting for result, In between if he wants to cancel the query execution, I need to give a cancel button in the form..

What I have to do, to cancel the process and cancel the web request and make the application idle.


Please help me. Give idea.

Thanks in advance.
Peer Mohamed Mydeen.

推荐答案

我认为您实际上不能取消webmethod的过程,但是您可以设置一个标志来告知已调用的代码它不处理返回的数据(对于异步方法尤其如此).
I don''t think you can actually cancel the webmethod''s process, but you can set a flag that tells the code that called it not to process the returned data (this is especially true of ansynchronous methods).


这篇关于在c#桌面应用程序中取消当前的webmethod访问权限???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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