开发者

Display server progress

I have a login form through through which the user will login into my application. i have a server whos services are made in WCF. i am using the services o开发者_运维知识库n the server to authenticates the user. i have to display a server progress time at the client end.how is this possible??.please help

thnx in advance.


And how can you measure progress on the server? Progress is usually shown for processing which can be measured. For example if you need process 1000 records you can show progress but if you need authenticate user you simply can't because there is no constant measurable increment in the processing. Moreover measuring progress requires duplex communication = a client will request something and the server will send back callbacks informing about increments. But the server is able to send callback only when the client is authenticated so you can't send progress of authentication back to client. Btw. authentication should take no more then few seconds so there is no reason to show progress. Use some animated gif (in case of web application) or change cursor (in case of WinForms or WPF) to show processing.


If you control and can change the WCF service than one possibility would be to make it a duplex service and have the service post back progress information to the client.

See Here for more information on Duplex Services

Another possibility would be to call the Login operation asynchronously from the client and provide a method in the WCF service to poll for the progress from client. for info on calling Service operations asynchrouneously please look here.

Or maybe the simplest approach, call the Login operation asynchronously from the client and present a dialog to the user with some animation and a "Logging in... Please wait!"

To be honest I would take the simple approach...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜