Reputation: 26311
Is web service instance creates for every request? Can I declare field in web service and be sure, that it will not be intersected for different users?
Upvotes: 1
Views: 212
Reputation: 769
If you mean ASP.NET then the threads are reused so if you declare a variable threadlocal it is still accessible in different requests. You can use HttpContext.Current.Items for per-request storage.
Upvotes: 1