the problem as in the Title. I thought that session variables are stored in the memory and the only cookie creates is SessionID cookie. For some reason every time I create session variable it also creates a cookie with the same name. Is it normal behavior?
Code:
HttpContext.Current.Session[varName.ToString()] = value;
Yes, it is absolutely normal. By default sessions are tracked by cookies. So when you store something into the session a cookie with an unique id is emitted to the client so that on subsequent requests this client sends the cookie and the server is able to retrieve whatever it stored in memory using this id.
If on subsequent requests you update the session value there won’t be a new cookie. The session is already associated with this client.