I have an application in a virtual directory (ASP.Net 4.0 C#). It is secured with forms authentication. Within my application are sub directories so that I have a content tree that matches the rough order of my website
www.server.com/application/sub-directory1/sub-directory2/
<forms name=".ADAuthCookie" loginUrl="Login.aspx" slidingExpiration="true" timeout="100" defaultUrl="~/Default.aspx"/>
What should the "loginUrl" be to allow it to work from a subdirectory? i.e. if your session times out, how can you get the loginUrl to redirect you to the right place?
if you set it to loginUrl="~/Login.aspx" and you are in sub-directory 1, it redirects you to www.server.com/application/sub-directory1/login.aspx which does not exist. I want it to always redirect to www.server.com/application/login.aspx
Thanks