Completely disable Forms authentication in ASP.NET -


how disable forms authentication in asp.net application , replace custom authentication module?

i set authentication mode none in web.config

<authentication mode="none" /> 

and attached own authentication module

  <add name="customauthenticationmodule" type="customauthenticationmodule, auth"/> 

my custom authentication module has

    application.authenticaterequest += new eventhandler(this.application_authenticaterequest);     application.postauthenticaterequest += new eventhandler(this.application_postauthenticaterequest);     application.authorizerequest += new eventhandler(this.application_authorizerequest); 

everything looks working except 1 thing... when try access secured page required admin roles

  <location path="somepage.aspx">     <system.web>       <authorization>         <allow roles="admin"/>         <deny users="*"/>       </authorization>     </system.web>   </location> 

my handler doesn't catch authorizerequest event. instead request returned browser

access denied. error message 401.2.: unauthorized: logon failed due server configuration. verify have permission view directory or page based on credentials supplied , authentication methods enabled on web server. contact web server's administrator additional assistance

looks other handler processed request , return unauthorized request code? didn't disabled forms authentication or missed else?

try enabling anonymous authentication if have not or integrated windows authentication. if using anonymous authentication make sure iis running.

also, check properties of folder , make sure permissions added.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -