I added 2 projects this dll
Femiani.Web.Modules.SharedSessionModule
web site 1 code
<div>
<asp:textbox id="txtEnterData" runat="server" xmlns:asp="#unknown" />
<br />
<asp:label id="lblSavedData" runat="server" xmlns:asp="#unknown" />
<br />
<asp:button id="btnSave" text="Kaydet" onclick="Save_Click" runat="server" xmlns:asp="#unknown" />
<br />
<br />
<asp:hyperlink id="lnkNextApp" text="MVC git" runat="server" xmlns:asp="#unknown" />
</div>
protected void Page_Load(object sender, EventArgs e)
{
// lnkNextApp.NavigateUrl = "http://localhost:7048/Home";
lnkNextApp.NavigateUrl = "http://localhost:7848/SessionSharingAspNet3/Default.aspx";
}
protected void Save_Click(object sender, EventArgs e)
{
Session["DATA"] = txtEnterData.Text;
lblSavedData.Text = string.Format("'{0}' Session save", txtEnterData.Text);
string ss = Session["DATA"].ToString();
}
<configuration>
<appsettings>
<add key="ApplicationName" value="SharedWeb" />
</appsettings>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetframework="4.0" />
<httpmodules>
<add name="SharedSessionModule" type="Femiani.Web.Modules.SharedSessionModule, Femiani.Web.Modules.SharedSessionModule" />
</httpmodules>
</system.web>
<system.webserver>
<modules runallmanagedmodulesforallrequests="true" />
</system.webserver>
</configuration>
web site 2 code
protected void Page_Load(object sender, EventArgs e)
{
if (Session["DATA"] == null)
{
lblSession.Text = "Session Yok";
}
else
{
lblSession.Text = Convert.ToString(Session["DATA"]);
}
}
<configuration>
<appsettings>
<add key="ApplicationName" value="SharedWeb" />
</appsettings>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetframework="4.0" />
<httpmodules>
<add name="SharedSessionModule" type="Femiani.Web.Modules.SharedSessionModule, Femiani.Web.Modules.SharedSessionModule" />
</httpmodules>
</system.web>
<system.webserver>
<modules runallmanagedmodulesforallrequests="true" />
</system.webserver>
</configuration>