0

Here is my .config

<authentication mode="Forms">
  <forms loginUrl="~/LogOn" path="/"/>
</authentication>
<authorization>
  <deny users="?"/>
</authorization>

When I do that on IIS7 it's ok, but on IIS6...

Under IIS7:

  • Browse /Home/
  • Redirect to /LogOn (because anonymous)
  • Display /LogOn page

It's OK,

But under IIS6

  • Browse /Home/
  • Redirect to /LogOn (because anonymous)
  • Can't display /LogOn page because anonymous :(

What is the solution?

1 Answer 1

1

You are denying anonymous users acces to your login page. Add to your web.config

<location path="login.aspx">
    <system.web>
        <authorization>
            <allow users="?"/>
        </authorization>
    </system.web>
</location>

substitute login.aspx with your login page.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.