In our website, we add a log whenever a user logs in. Now we add the log just before it goes to the home page. But, suppose when the user is not logged in and try to hit any url other than the home page or default page. At that case the ReturnUrl is that page in login page. So, after the login it goes to the requested page instead of home. So, it doesn't go through the part where we are logging about the log in of the user.
So I am trying two things either we can any way disable the ReturnUrl or we can set default ReturnUrl so irrespective of the ReturnUrl it goes always to the home page.
Can anybody help me with this.
We are using Form authentication
<authentication mode="Forms">
<forms loginUrl="Login.aspx" defaultUrl="Default.aspx" protection="All" path="/" slidingExpiration="true" cookieless="UseCookies" enableCrossAppRedirects="true" />
</authentication>