Here i am passing the session id on a button click from one asp.net application to another asp.net application.
Application 1:
protected void imgBTN_Click(object sender, EventArgs e)
{
   string sessionKey = HttpContext.Current.Session.SessionID;
   HttpWebRequest req = (HttpWebRequest)WebRequest.Create(@"http://localhost:43392/PartnerHome.aspx");
   string svcCredentials = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(sessionKey));
   req.Headers.Add("Authorization", "Basic " + svcCredentials);
   try
   {
      using (WebResponse svcResponse = (HttpWebResponse)req.GetResponse())
      {
         using (StreamReader sr = new StreamReader(svcResponse.GetResponseStream()))
         {
            string jsonTxt = sr.ReadToEnd();
         }
      }
   }
   catch (Exception c)
   {
   }
}
and my problem here is how to retrieve this session id there in my second asp.net application pageload
Application 2:
protected void Page_Load(object sender, EventArgs e)
{
}
Any Suggestion?
 
     
    