Click here to Skip to main content
15,896,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my login page work correct in google chrome
but its give me issue in IE
when In my web.config file I write :

XML
<authentication mode="Forms">
            <forms name="login" defaultUrl="Login.aspx" loginUrl="Login.aspx"   timeout="120"/>
               </authentication>
   <authorization >
     <allow users="admin,coal"/>   
   </authorization>

It Works Fine

But When I Write :
XML
<authentication mode="Forms">
            <forms name="login" defaultUrl="Login.aspx" loginUrl="Login.aspx"   timeout="120"/>
               </authentication>
   <authorization >
     <allow users="admin,coal"/>
     <deny users="?" />
   </authorization>


login page does not work it just refresh the page
but i want to deny anonymous user to my website application
Can any one suggest any solution...???
Posted

1 solution

Read the following:

Form authentication and authorization in ASP.NET[^]

By setting deny to ? it allows any authenticated user to access the page. You need to set deny to * (Block everyone) with just the exceptions listed under allow. Try the following:

XML
<authentication mode="Forms">
  <forms name="login" defaultUrl="Login.aspx" loginUrl="Login.aspx" timeout="120"/>
</authentication>
<authorization>
  <allow users="admin,coal" />
  <deny users="*" />
</authorization>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900