title: How safe is Session in C#
body: <p>Well, i know that the title is not saying much, i am sure that many people is asking that question (I didn't find any). </p>
  
  <p>I am building a new web site with user interface, and when the user login into the web i am giving him a guid into session, </p>
  
  <p>Something like that - <code>Session["User"] = Guid.NewGuid();</code></p>
  
  <p>So. I am using this User(Session) as my main token into the web, is my way of checking who is he, is he logged in? and hes token to the whole web api. </p>
  
  <p>The question is really simple. How safe is this? because you can get this via simple JavaScript right? but i am not sure if they have any way of getting this (Talking about hackers not the user). and another question, can the user get this?</p>
  
  <p>SO. to make it more simple because my english is probably really bad. </p>
  
  <ol>
  <li>How safe is this?</li>
  <li>Can the user get this ?</li>
  </ol>
  
  <p>Thanks alot guys, have a good night.</p>
  
  <p>EDIT -- </p>
  
  <p>This is the JavaScript to get the session for thos who ask how to do it </p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
          GetUserName();
          function GetUserName()
          {
  
              var username = '&lt;%= Session["User"] %&gt;';
              alert(username );
          }
      &lt;/script&gt;
  </code></pre>