I have set the defaultUrl as
<forms loginUrl="Home/Login.aspx" defaultUrl="Items/Default.aspx" name="MySite" timeout="120" slidingExpiration="true" requireSSL="false"/>
problem is when i first time login it takes me to the defualtUrl page but once i click on the logout button it logs me out, if i log back in again it takes me to Home/Default.aspx instead. i am using FormAuthentication.
I have tried following settings as well
<system.webServer>
<defaultDocument enabled="true">
<files>
<add value="Items/Default.aspx"/>
</files>
</defaultDocument>
</system.webServer>
I dont know the reason why its happening. Any help will be appreciated.
Thanks
Does
Items/Default.aspxrequire the user to be authenticated in order to get access to it? If so, it may be the cause of such behaviour.You can allow anonymous user access to
Items/Default.aspxby doing this in your web.config:Update: This may be a workaround for your issue whilst you find another alternative:
In the
Page_LoadofHome/Default.aspxyou can check if the user is actually authenticated and redirect them accordingly:I hope this help.