KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Topic of Silverlight WCF service proxy lifecycle is not very clear to me. I have read various materials, resources, answers here, but still I don't completely understand the supposed best way to use them. I am using custom binary binding in Silverlight 4.0 currently. Is creation of a proxy in silverlight an expensive operation? Should we try to share proxy instance in code or create new is better? Should we do locking if we do share in case multiple threads access it? Since an error on a proxy will fault the state of a proxy I think sharing a proxy isn't a good idea, but Ive read that creation is expensive, so its not 100% clear what to do here. And with closing - silverlight WCF service clients only provide CloseAsync method. Also proxies require certain logic to be used when they are closed ( if they are faulted we should call Abort() which is synchronous in Silverlight and if not we should CloseAsync which is not synchronous or what?). In many official Silverlight samples from MS proxies are not closed whatsoever , is that just flaw of materials or expected approach to them? Topic is very important to me and I want a clear understanding of all things that should be considered which I currently don't have. ( I did see that this question What is the proper life-cycle of a WCF service client proxy in Silverlight 3? appears close to mine but I cannot say I am satisfied with quality of answers) I would really like to see sample code that uses, creates , closes etc WCF proxies, and most importantly explains, why that is the best possible way. I also think (currently believe) that because of nature of problem, there should be a single, general use best practice/pattern - approach to use (create,reuse,close) WCF proxies in Silverlight.
Tags (comma-separated)
Save Edits
Cancel