B
Beto
I have tested that using locks for sinchronize calls to a web service
does not work correctly. Surely I am doing something wrong.
I have a "global" object for the "semaphore":
public object oLockOfWebService = new object();
And we have two concurrent libraries (one in c# and another in vb.net)
that realize calls to a webservice with this code:
Project A:
SyncLock Me.oGeneric.oLockOfWebService
data = WSClass.GetEventInfo(GuidAgent)
End SyncLock
And the c# code of the project B:
lock (this.oGenericData.oLockOfWebService)
{
oDataTerminalInfo =
this.IrmWS.GetTerminalInfo(this.AgentGuid);
}
I have tested (using strings logs) that sometimes one webmethod of the
webservice is called when the other HASN´T finished).
Any idea?
Thanxs in advance,
does not work correctly. Surely I am doing something wrong.
I have a "global" object for the "semaphore":
public object oLockOfWebService = new object();
And we have two concurrent libraries (one in c# and another in vb.net)
that realize calls to a webservice with this code:
Project A:
SyncLock Me.oGeneric.oLockOfWebService
data = WSClass.GetEventInfo(GuidAgent)
End SyncLock
And the c# code of the project B:
lock (this.oGenericData.oLockOfWebService)
{
oDataTerminalInfo =
this.IrmWS.GetTerminalInfo(this.AgentGuid);
}
I have tested (using strings logs) that sometimes one webmethod of the
webservice is called when the other HASN´T finished).
Any idea?
Thanxs in advance,