[英]How can I keep the session with the webservice at client?
My clients could invoke the webservice dynamically by reflection. 我的客户可以通过反射动态调用Web服务。 But how to get the cookies about the session with the webservice?
但是,如何获取有关Web服务会话的cookie? 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?
我知道将webmethodattribute enablesession设置为true,但是在客户端通过反射生成的webservice对象没有cookiecontainer的属性,如何使其保持会话状态?
在Web服务方法上使用EnableSessionAttribute,这将使它们使用(并保持)会话对象,如MSDN此处所述 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.