Wcf How to termiate session in a OperationContract[isInitiating=true] -
i have operation contract named "login" , has isinitiating=true flag.
client sends it's credentials function , need check credentials , return message client "your credentials not correct!" , must close session immediately. how can this?
it's not possible in same operation, because cannot use isinitiating=true
, isterminating=true
@ same time.
the msdn shows how implement both: msdn
a possible solution throw exception instead of return message. can handle exception in client , close channel.
this how works "behind scenes" msdn attests:
in client application, value of isterminating set true instructs wcf close channel after reply arrives.
there question how end session on server side can you: end-a-wcf-session-from-the-server
Comments
Post a Comment