Asp.net Membership - Login from different asp.net application folder
<p>If have got an asp.net website with the following structure, the root used to be plain HTML and all .aspx pages where in a subfolder application. In the subfolder application, members are able to login via the asp.net membership, but not able to do this from the homepage.</p>

<p><strong>Ideal solutions:</strong></p>

<p>I would like visitors to be able to login from the homepage, rather then just from the subfolder.</p>

<p><strong>Current setup:</strong> </p>

<p>The root of the website contains a web.config file with asp.net membership configuration, The form settings are pointing to a (sub) folder within the same website:</p>

<p>in the <strong>root</strong> web.config I have:</p>

<pre><code> &lt;forms name="aspnetUsers" loginUrl="SUBFOLDER/account/login.aspx" timeout="43200" cookieless="UseCookies" /&gt;
</code></pre>

<p>in the <strong>root / subfolder</strong> web.config I have:</p>

<pre><code> &lt;forms name="aspnetUsers" loginUrl="~/account/login.aspx" timeout="43200" cookieless="UseCookies" /&gt;
</code></pre>

<p><strong>Problem:</strong></p>

<p>I'm able to click on the Login link of Login control on the homepage, which will take me to <code>root / subfolder / account / login.aspx</code>, but after login, I return to the Homepage in the root folder and the Login control doesn't recognizes me as being logged in, however when I browse to a page within the <code>root / subfolder</code> I'm logged in?</p>

<p>How I can best deal with this problem? </p>