0
votes

I want to block access to all pages on my site, except the ones I specify that are accessible to all users. I first disable access to all pages on the site:

<authorization>
      <deny users="?,*" />
      <allow roles="Manager, Driver, Dispatcher,Promoter, Admin " />
    </authorization>

Than I enable access to Default.aspx

<location path="Login.aspx">
<system.web>
  <authorization>
    <allow users="?,* " />
  </authorization>
</system.web>

Default.aspx is accessible to all users as expected, but when I go to mysite.com/ I get redirected to mysite.com/Login.aspx?ReturnUrl=%2f .

If I specify mysite.com/Default.aspx - works fine..

Why does Forms authentication ask me to login if I access mysite.com/ without being logged in, even though Default.aspx is the default page on the site?

1

1 Answers

0
votes

The way you have it set up, you are only allowing access to Login.aspx. Simply add another line for Default.aspx