The site I'm creating has one section for non authenticated users and another for authenticated users.
(almost) every page in the site has a LoginStatus control which is located in the header and shown as 2 different buttons depending on status.
The problem I have, is that with pages in the non-authenticated folders of the site despite setting the LogoutPageUrl value in that control to the value "~login.aspx", the site merely refreshes the page but the control DOES show that the user is logged out by displaying the correct image in the control..and when clicking on that control again you ARE directed to the login page.
here's that control:
<asp:LoginStatus CssClass="loginControlBtn" ID="LoginStatus2"
runat="server" LogoutPageUrl="~/login.aspx"
LoginImageUrl="~/images/LoginBtn.jpg"
LogoutImageUrl="~/images/LogoutBtn.jpg" />
Also, once clicking on the login option on the LoginStatus control and logging in again you aren't directed to the page specified in the Login control, but end up back at the page you were at when you selected the Login option on the LoginStaus control.
here's the code for that 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 pages in the "~/admin" folder..and at least THAT part is working properly as when selecting to logout whilst at a page in that folder you're directed to the "~/login.aspx" page.
But then when you login again rather than going to
DestinationPageUrl="~/admin/HelpDeskOptions.aspx
as specified in the Login control you're directed back to the page you came from.
I'm really stumped.