c# - how redirect to a login page specified in a web.config file inside folder -
i use web.config file inside folder block users. want redirect page specified here:
<?xml version="1.0"?> <configuration> <system.web> <authentication> <forms loginurl="~\paginas\login\loginvendedor2.aspx"/> </authentication> <authorization > <deny users="?"/> </authorization> </system.web> </configuration>
but redirected page specified in web.config file in root of site
web.config has feature called configuration inheritance. there excellent article here.
you need edit web.config file in root directory , add attribute inheritinchildapplications="false"
tags don't want web.config in sub-folder inherit. should work on forms
tag. can't test right , may need block inheritance authenication
tag instead.
Comments
Post a Comment