1

我是 WCF 的新手。经常凝视 wcf 代码和文章。在查看了许多代码后,我经常坚持非常基本的事情,并且没有对以下问题进行详细讨论。所以这是我的几个基本问​​题....并寻找示例情况和示例代码的详细讨论。

问题一

if we do not write anything like SessionMode=SessionMode.Required 
then what will be default nature of WCF service. there will be no session

a) SessionMode.Required
b) SessionMode.Allowed
c) SessionMode.NotAllowed

简单说说SessionMode.Required,SessionMode.Allowed是什么意思,SessionMode.Required,SessionMode.Allowed有什么区别?

什么是默认会话模式?

我见过人们开发 wcf 服务,但没有指定任何类似 session 的东西。所以只要告诉我什么时候应该打开 SessionMode.Required 或 SessionMode.Allowed ?

问题 B

what is InstanceContextMode? 
many people use InstanceContextMode Single or PerCall or PerSession ?

当我应该选择 InstanceContextMode Single 或 PerCall 或 PerSession 时,我只需要深入了解?

简要告诉我何时打开 Single 会发生什么,或者在 PerCall 或 PerSession 的情况下会发生什么?Single 或 PerCall 或 PerSession 有什么区别

什么是默认 InstanceContextMode ?

问题 C

what is ConcurrencyMode ??
actually what ConcurrencyMode  does.....what it determines??
there are few ConcurrencyMode available and those 
are Multiple,Reentrant and Single

which concurrent mode one should use in what kind of situation. 
what will be the best    choice

问题 D

what is the meaning of UseSynchronizationContext=false 
when one should turn on UseSynchronizationContext=true 
or when one should go for UseSynchronizationContext=false ?

问题 E

关于运营合同

[OperationContract(IsInitiating=false, IsOneWay=false)]
bool Add_Contact(int sessionkey, string Newusrname);

IsInitiating=false 或 true 是什么意思。我什么时候应该设置它为真或假?IsOneWay=false 或 true 的含义是什么。我什么时候应该设置它为真或假?

我相信我的问题是非常基本的,每次监控这个论坛时都有很多学者。我希望我能在很多情况下得到最好的答案,比如当一个人应该选择哪个选项而不是其他选项时,只需要很少的示例代码来模拟情况。谢谢

4

0 回答 0