title: Failed to retrive session value when called the page using WebRequest.Create(URL)
body: <p>I have a page (email.aspx) which is retrieving a session value and do some processing depends on that value.</p>
  
  <p>When I call email.ASPX directly from the browser using its URL everything works perfectly without any issues.</p>
  
  <pre><code>Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
          Dim emailaddress As String
          Dim x As String = ""
          x = Session("id")
          If x = "" Then
              emailaddress = "failed to get session"
          Else
  
              ' Do some staff here
          End If
  
          Response.Write(emailaddress)
  
  
      End Sub
  </code></pre>
  
  <p>But when I try to call (email.aspx) using WebRequest.Create(URL) from another ASPX page that included embedded vb.net code, I figure out that it is failed to retrieve the Session value which leads to an error!</p>
  
  <pre><code>Public Function getemailaddress() As String
  
          Dim sURL As String
          sURL = "http://sample/email.aspx"
  
          Dim wrGETURL As System.Net.WebRequest
          wrGETURL = System.Net.WebRequest.Create(sURL)
  
  
          Dim emailaddress As String
          Dim objStream As System.Net.HttpWebResponse
          objStream = wrGETURL.GetResponse
  
          If objStream.StatusCode = System.Net.HttpStatusCode.OK Then
              Dim responseStream As System.IO.StreamReader
              responseStream = New System.IO.StreamReader(objStream.GetResponseStream())
              emailaddress = responseStream.ReadToEnd()
          End If
          objStream.Close()
  
  
          Return emailaddress
  
      End Function
  </code></pre>
  
  <p>I can't figure out the reason behind this issue</p>