Click here to Skip to main content
16,013,440 members
Home / Discussions / C#
   

C#

 
AnswerRe: Unique values in list Pin
Reiss31-Oct-11 3:28
professionalReiss31-Oct-11 3:28 
QuestionWCF server don't detect lost or broken connection? Pin
teknolog12331-Oct-11 0:04
teknolog12331-Oct-11 0:04 
AnswerRe: WCF server don't detect lost or broken connection? Pin
PIEBALDconsult31-Oct-11 2:44
mvePIEBALDconsult31-Oct-11 2:44 
GeneralRe: WCF server don't detect lost or broken connection? Pin
teknolog12331-Oct-11 3:18
teknolog12331-Oct-11 3:18 
GeneralRe: WCF server don't detect lost or broken connection? Pin
jschell31-Oct-11 8:34
jschell31-Oct-11 8:34 
GeneralRe: WCF server don't detect lost or broken connection? Pin
PIEBALDconsult31-Oct-11 14:02
mvePIEBALDconsult31-Oct-11 14:02 
GeneralRe: WCF server don't detect lost or broken connection? Pin
jschell3-Nov-11 7:56
jschell3-Nov-11 7:56 
AnswerRe: WCF server don't detect lost or broken connection? Pin
BobJanova31-Oct-11 3:19
BobJanova31-Oct-11 3:19 
Like all HTTP based web services, WCF doesn't really have the concept of a connection, so if you care, you need to do something like what you describe. Alternatively, you can just let the HTTP session expire if a user disappears. The considerations you need to make are similar to when creating a normal web application. Requiring a login to make an authenticated session in the first place means that it generally doesn't matter if you have inactive sessions not being actively closed, as they are pretty difficult to hijack (I think IIS sessions are bound to IP and session ID).

A web service call should never block waiting for server side user input. Web services should be able to run in a lights-out environment, with the only communication needed to talk to them being the service interface itself. (Any client side user input can be taken before or after particular service calls, which may require splitting a large call up into smaller ones if intermediate input is required, but each call should be self contained and executable.) If you want to provide information at runtime so you don't have to recompile the service, you should use some sort of configuration file or data store which the service can look at to make its decision.

If your service is doing something for which manual inspection of requests is necessary (this is very rarely actually necessary, but perhaps for military or dangerous research environments there are times when it could be), the service function should place a request onto a queue, and immediately return with a value that indicates that the request is pending approval. Any further attempts to do anything on that request that can't proceed until the server-side operator approves it should cause service methods to throw exceptions until it is manually approved, and the client should poll to find out whether the status of any of its pending requests has changed. That queue should also be read by another application which is what the manual approver will use to inspect pending requests.

I strongly suspect you don't actually need that but if you think you do, please state your requirement for that in more detail so some better help can be created for you (if that one paragraph version was not enough).
GeneralRe: WCF server don't detect lost or broken connection? Pin
teknolog12331-Oct-11 4:01
teknolog12331-Oct-11 4:01 
GeneralRe: WCF server don't detect lost or broken connection? Pin
PIEBALDconsult31-Oct-11 5:11
mvePIEBALDconsult31-Oct-11 5:11 
GeneralRe: WCF server don't detect lost or broken connection? Pin
BobJanova31-Oct-11 5:14
BobJanova31-Oct-11 5:14 
GeneralRe: WCF server don't detect lost or broken connection? Pin
Pete O'Hanlon31-Oct-11 5:24
mvePete O'Hanlon31-Oct-11 5:24 
AnswerRe: WCF server don't detect lost or broken connection? Pin
jschell31-Oct-11 8:44
jschell31-Oct-11 8:44 
GeneralRe: WCF server don't detect lost or broken connection? Pin
PIEBALDconsult1-Nov-11 2:56
mvePIEBALDconsult1-Nov-11 2:56 
GeneralRe: WCF server don't detect lost or broken connection? Pin
jschell3-Nov-11 8:00
jschell3-Nov-11 8:00 
GeneralRe: WCF server don't detect lost or broken connection? Pin
teknolog1231-Nov-11 23:33
teknolog1231-Nov-11 23:33 
QuestionOnline Exam Using Sqlsqerver in Asp.Net using C#.Net Pin
kitupadma30-Oct-11 21:32
kitupadma30-Oct-11 21:32 
AnswerRe: Online Exam Using Sqlsqerver in Asp.Net using C#.Net Pin
Abhinav S30-Oct-11 22:08
Abhinav S30-Oct-11 22:08 
AnswerRe: Online Exam Using Sqlsqerver in Asp.Net using C#.Net Pin
BobJanova30-Oct-11 22:58
BobJanova30-Oct-11 22:58 
AnswerRe: Online Exam Using Sqlsqerver in Asp.Net using C#.Net Pin
phil.o30-Oct-11 23:26
professionalphil.o30-Oct-11 23:26 
QuestionReading values from xml string Pin
sarang_k30-Oct-11 21:05
sarang_k30-Oct-11 21:05 
AnswerRe: Reading values from xml string PinPopular
Abhinav S30-Oct-11 22:07
Abhinav S30-Oct-11 22:07 
GeneralRe: Reading values from xml string Pin
BobJanova30-Oct-11 22:59
BobJanova30-Oct-11 22:59 
GeneralRe: Reading values from xml string Pin
Abhinav S30-Oct-11 23:01
Abhinav S30-Oct-11 23:01 
AnswerRe: Reading values from xml string Pin
V.31-Oct-11 3:26
professionalV.31-Oct-11 3:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.