ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Can we generate asynchronous client proxy for a non-asynchronous WCF service method?

user-image
تم إضافة السؤال من قبل Osama Gamal , Software Consultant , Ministry of Interior
تاريخ النشر: 2016/08/16
Mohammad Shadab
من قبل Mohammad Shadab , Software Developer , COSMO Info Solution

this failed miserably when calling two services at the same time with the following error: "This OperationContextScope is being disposed on a different thread than it was created."

Do not use the asynchronous “await” pattern within a OperationContextScope block. When the continuation occurs, it may run on a different thread and OperationContextScope is thread specific. If you need to call “await” for an async call, use it outside of the OperationContextScope block.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟