WCF request served to wrong client
In my project I have a WCF service created. It has around 150 methods. This WCF service will be consumed by iPhones using our iPhone application. The request from the iPhone will be served as XML. This XML will be parsed by the iPhone client and displayed. So the whole business is available in the WCF service side. It uses SQL Server 2005 for data storage and stored procedures are used to query data. The request will be sent by the iPhone by creating the XML SOAP request.
The problem what I am facing is, when multiple iPhone client accesses the service, sometimes the request is served to wrong clients. That means if iPhone A calls a method M and iPhone B calls a method N, the response of method M is served to iPhone B and response of method N is served to iPhone A.
开发者_开发技巧I am not sure where the problem is lying, whether in the database side or in the WCF service side.
It's hard investigate when we don't see the code but are you sure that the request is really sent to the wrong client? Could it be the right request with the wrong data instead?
My advice is to check every shared resources of your process that could have an impact on the data that will be sent back to the client. By shared resources, I mean anything that can be accessed by more than one tread at the same time (shared variables, file, ...)
精彩评论