I want to use the Session.SessionID
as file name and query string in URL. I want to know if its format is suitable for these applications. For example you can not use '?'
or '<'
characters in a file name.
Is SessionID format string safe for file names and query strings?
About SessionID and Cookies At the beginning of a new session, the server stores the Session ID in the user's Web browser as a cookie. The SessionID cookie is similar to a locker key in that, as the user interacts with an application during a session, ASP can store information for the user in a "locker" on the server.
By Default Session Id is Stored in Client m/c in the form of text file.It is Called Cookie. If session is Cookie less the that is append to Url . In Cookies.
Net_SessionId is a cookie which is used to identify the users session on the server. The session being an area on the server which can be used to store data in between http requests.
The server reads the SessionId which was sent by the client in question 1. The server maintains for example a key value data object so it can load the right data for the given SessionId . ASP MVC doesn't use a viewstate since it's a completely different approach than ASP.NET.
From this MSDN link
"The ASP.NET session identifier is a randomly generated number encoded into a
24-character string consisting of lowercase characters from a to z and numbers
from 0 to 5."
So the answer is, Yes & it's safe to be used for file names and query strings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With