Session in ASP.NET webservices
-
Hello buddies, I wana know what session is in ASP.NET webservices exactly is. I thought it is something like session in ASP.NET web application that holds variables related to a specified user who sends requests in a row but in my tests after a first method call that I set a session variablle and in the next call this variable returns null. Can u explain it for me? - Den 2 Fly --- "Art happens when you least expect it."
-
Hello buddies, I wana know what session is in ASP.NET webservices exactly is. I thought it is something like session in ASP.NET web application that holds variables related to a specified user who sends requests in a row but in my tests after a first method call that I set a session variablle and in the next call this variable returns null. Can u explain it for me? - Den 2 Fly --- "Art happens when you least expect it."
I had similar problems, may be this will help. Hope u have used this [WebMethod(EnableSession=true)] for your webmethods from the client side sometimes cookie collection has a problem try this before u call ur webservice method using System.Net; private CookieContainer cookies; Service1 testService = new Service1(); if (cookies==null) { cookies = new System.Net.CookieContainer(); } testService.CookieContainer = cookies; cool man
-
I had similar problems, may be this will help. Hope u have used this [WebMethod(EnableSession=true)] for your webmethods from the client side sometimes cookie collection has a problem try this before u call ur webservice method using System.Net; private CookieContainer cookies; Service1 testService = new Service1(); if (cookies==null) { cookies = new System.Net.CookieContainer(); } testService.CookieContainer = cookies; cool man