user392839
user392839

Reputation: 21

How can I keep the session with the webservice at client?

My clients could invoke the webservice dynamically by reflection. But how to get the cookies about the session with the webservice? I know set the webmethodattribute enablesession is true, but at the client the webservice object which was generated by reflection has not the attribute of cookiecontainer, how to make it to keep the session state?

Upvotes: 2

Views: 1029

Answers (1)

Abel
Abel

Reputation: 57159

Use the EnableSessionAttribute on your web service methods, this will make them using (and keeping) a session object, like explained here at MSDN.

Upvotes: 1

Related Questions