How to configure session state to use cookies in ASP.NET

Software developer can configure session state through web.config file for his current application (which is found in the same virtual directory as the .aspx web page files). UseCookies is the one of possible modes for HttpCookieMode. When this mode is set cookies will be always used, even if the browser or device do not support them or they are disabled. This is mode is by default. If the device does not support cookies, session information will be lost over subsequent request, because each request will get a new ID.