title: Cannot read cookie from another page in different web application on same domain Asp.Net
body: <p>When I open a page from another web application on same domain I am trying to read the cookie that was created on the original page, But it I cant read the cookie. If I move that page in to the same web application then it works, but thats not what I want.</p>
  
  <pre><code>[Domain: MyCompany.mobi]
  [WebApp A] - create cookie and launch page
  
  Protected Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
    Dim aCookie As New HttpCookie("TestCookie")
    aCookie.Value = "Hello World"
    aCookie.Expires = DateTime.Now.AddDays(1)
    Response.Cookies.Add(aCookie)
  
    Dim script = "window.open('http://MyCompany.mobi/webappB/default.aspx?id=TestCookie')"
  
    'open page in WebsiteB
    ScriptManager.RegisterStartupScript(Me, Me.GetType, "OpenPage", script, True)
  End Sub
  </code></pre>
  
  <hr>
  
  <pre><code>[Domain: MyCompany.mobi]
  [WebApp B] - read the cookie and display in label
  
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      Dim id As String = ""
  
      If Request.QueryString("id") IsNot Nothing Then id = Request.QueryString("id").ToString
  
      If Request.Cookies(id) IsNot Nothing Then
          Dim aCookie As HttpCookie = Request.Cookies(id)
          Label1.Text = aCookie.Name &amp; " : " &amp; aCookie.Value
      Else
          Label1.Text = "Cannot read cookie"
      End If
  
  End Sub
  </code></pre>