Authorization, JSON, and Redirecting in ASP.NET -


first off, familiar with issues regard autorization , json services. see: how manage redirect request after jquery ajax call.

my situation: have admin directory, own "admin" directory, denying unauthenticated users:

<?xml version="1.0" encoding="utf-8" ?> <configuration>   <system.web>      <authorization>         <deny users="?" />     </authorization>    </system.web> </configuration> 

within directory main page , 2 http handlers i'm using uploading files , not. now, while i've got code handle situation when user unauthorized when handler accessed via or post, seems handler never executed, , gets/posts redirected login page. suppose , good, i'd http handlers handle issue , handle differently (at least give 401 code instead of redirecting).

it seems should easy (and bet is easy) poke holes allow http handlers handle own security, i'm kinda @ wit's end here, hoping kindly show me how need modify web config allow services handle own authorization. thanks!

have tried specifying each one?

  <location allowoverride="false" path="content">     <system.web>       <authorization>         <allow users="*" />       </authorization>     </system.web>   </location>   <location allowoverride="false" path="scripts">     <system.web>       <authorization>         <allow users="*" />       </authorization>     </system.web>   </location> 

be careful. order matters. least restrictive restrictive top bottom.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -