Hello Team,
I am using C# Web Form application.
I am using the following code that is is working fine in my local machine:
class: ac.aspx.cs Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
string crtUser = "";
if (User.Identity.IsAuthenticated)
{
crtUser = User.Identity.Name.Split('\\')[1];
Session["USER_ID"] = crtUser;
}
}
The issue is, after I deploy my code in the server User.Identity.IsAuthenticated it return false and I am not abel to get the Session["USER_ID"]
This is my web.config setting lines related to that:
<authentication mode="Forms">
<forms loginUrl="ac/ac.aspx" timeout="2880" />
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<location path="ac/ac.aspx">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
Can you please help on my issue, it is really appreciated
Have a great day
I am using C# Web Form application.
I am using the following code that is is working fine in my local machine:
class: ac.aspx.cs Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
string crtUser = "";
if (User.Identity.IsAuthenticated)
{
crtUser = User.Identity.Name.Split('\\')[1];
Session["USER_ID"] = crtUser;
}
}
The issue is, after I deploy my code in the server User.Identity.IsAuthenticated it return false and I am not abel to get the Session["USER_ID"]
This is my web.config setting lines related to that:
<authentication mode="Forms">
<forms loginUrl="ac/ac.aspx" timeout="2880" />
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<location path="ac/ac.aspx">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
Can you please help on my issue, it is really appreciated
Have a great day