Core と Web の 2 つのプロジェクトを使用したソリューションがあります。コアでは、何かを行うセッションを管理し、このメソッドを呼び出します。
public void SetLog()
{
HttpContext.Current.Session["Logged"] = true;
}
それは仕事です。
ページを変更すると (テスト用に ASP.NET 4.0 の既定のテンプレートを使用します)、[About] リンクをクリックして、次のメソッドを呼び出します。
public bool IsLogged()
{
if (HttpContext.Current.Session["Logged"] == null)
return false;
return true;
}
About ページで、Session are null, normal ? これをどのように解決しますか?
ありがとう、