The site I create has one section for unauthenticated users and another for authenticated users.
(almost) on every page of the site there is a LoginStatus control, which is in the header and displays as two different buttons depending on the state.
The problem I have is that with pages in the unauthenticated folders of the site, although the LogoutPageUrl value in this control is set to "~ login.aspx", the site just refreshes the page, but the DOES control that the user exits from the system by displaying the correct image in the control ... and clicking this control again, you will be directed to the login page.
here is this control:
<asp:LoginStatus CssClass="loginControlBtn" ID="LoginStatus2" runat="server" LogoutPageUrl="~/login.aspx" LoginImageUrl="~/images/LoginBtn.jpg" LogoutImageUrl="~/images/LogoutBtn.jpg" />
In addition, after clicking the login button in the LoginStatus control and logging in again, you are not directed to the page specified in the Login control, but return to the page you were on when you selected the Login option to the LoginStaus control.
here is the code for this Login control:
<asp:Login ID="helpDeskLoginCtrl" runat="server" DestinationPageUrl="~/admin/HelpDeskOptions.aspx" style="text-align: justify" VisibleWhenLoggedIn="False" Width="421px"> </asp:Login>
The site uses forms authentication so that only authenticated users can view the pages in the ~ / admin folder .. and at least this part works correctly, as when choosing the exit, while on the page in this folder you are directed to the page "~ / login.aspx".
But then when you log in again, not going to
DestinationPageUrl="~/admin/HelpDeskOptions.aspx
as indicated in the Login control, you are redirected to the page from which you came.
I'm really at a standstill.