mycwcgr

mycwcgr

  • NA
  • 13
  • 0

What differences are there for the two keyword Deny Allow between in .htaccess file and in web.config file?

Aug 30 2005 10:16 PM

What differences are there for the two keyword Deny Allow between in .htaccess file and in web.config file?

===========.htaccess  1 ==================
order allow,deny
allow from all
deny from 58.30.0.
deny from 59.64.
======================================

===========.htaccess  2 ==================
order allow,deny
deny from 58.30.0.
deny from 59.64.
allow from all
======================================

 

************ web.config 1 ************
<configuration>
    <system.web>
        <authorization>
            <deny users="?" />
            <deny roles="contractor, employee, manager" />
            <allow roles="administrator" />
        </authorization>
    </system.web>
</configuration>
**************************************

************ web.config 2 ************
<configuration>
    <system.web>
        <authorization>
            <allow roles="administrator" />
            <deny roles="contractor, employee, manager" />           
            <deny users="?" />   
        </authorization>
    </system.web>
</configuration>
**************************************


In .htaccess file, because there is the keyword "Order", so I can clearly understand that ".htaccess  1 " is the same as ".htaccess  2".

But in web.config, there is not the keyword "Order", is "web.config 1" the same as "web.config 2" ?

if not, what happened if a anonymous user try to visit?
if not, what happened if a Contractor user try to visit?
if not, what happened if a user not in Contractor, Employee, Manager try to visit?
if not, what happened if a Administrator user try to visit?