I've got a website that uses Forms Authentication, my dilemma is I need users to hit the Default.aspx page when they first navigate to the site with "www.[site].com". Then they have the option of clicking on the login link to get redirected to the login page and login to the site from there.
Right now whenever you request the site, you always get the login page. I'm not sure I'm using the right approach though?
Any thoughts?
Update: like this flow:
- Navigate to www.[site].com
- Get
Default.aspx - Click on
LoginStatuscontrol configured with an image - Redirects to
Login.aspx
Considering that web.config looks like:
<authentication mode="Forms">
<forms loginUrl="Default.aspx" timeout="20" protection="None" cookieless="UseCookies"/>
</authentication>
The LoginStatus control is like this:
<div class="loginStat">
<asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LoginImageUrl="~/images/Key-icon.png"
LogoutImageUrl="~/images/LogOut32.png" LogoutPageUrl="~/" ToolTip="Log in/out" />
</div>