I am in the process of converting a Web Site Project To Web Application Project. The website project works perfectly with session variables in the .master file or .aspx file. During the conversion of web application all the session values used in .aspx/.master file throws an error "session does not found at the current context" Is there any workaround for using session variables on the master page.
In this scenario, when the user logs in the session values are set and depending on the session values the pages are redirected. I am checking the session values in the HTML body using <% C#code %>. It gives error on all the session variables used.
I am trying to follow the link below in this process How to convert ASP.NET website to ASP.NET web application.
<ul class="SM">
<% if ((Convert.ToString(Session["ACCESS_LEVEL"])) == "ADMIN"))
{ %>
<br />
<li><a href="/FacultyDevSystem/Personal/FDS_AdminPersonalProfile.aspx?
fromwhere=LogAsAdmin" >Details</a></li>
<% }
else if ((Convert.ToString(Session["ACCESS_LEVEL"])) == "DDIR"))
{ %> <br />
<li><a href="/FacultyDevSystem/Personal/FDS_DDirPersonalProfile.aspx?
fromwhere=LogAsDDir"> Details</a>
</li>
<% } %>