Getting session in .NET ASMX web-service

SessionIDs are stored as cookies on the client's browser by default (Session State Overview). So check if that cookie is being created properly on that problem computer. Maybe cookies are disabled for some reason? In that case it would not be sending the SessionID to the server when you are hitting that web service.


Can you check how many worker processes is your application using? You can check it in your App pool settings in IIS.

If more than one worker process are being used then it is called to be running a web garden. If that is the case then in proc session will not be useful as this session is not shared among the worker processes. Have a look at http://www.west-wind.com/weblog/posts/2005/Apr/20/Why-you-shouldnt-use-InProc-Session-State-in-ASPNET


Have you got Session disabled in IIS, this would over rule .net.

Have a look at this http://technet.microsoft.com/en-us/library/cc732964(v=ws.10).aspx - it tells you how to disable session, but shows where to check the setting.

Thanks Fran


maybe it's too late, but have you tried this:

[WebMethod(EnableSession = true)]
public string checkSession()
{
    return HttpContext.Current.Session.SessionID
}