asp.net - ASMX script service returns 401 basic when using forms authentication and bad auth ticket -
i have asp.net 4.0 application contains web service used render data through ajax. have service attached scriptmanager through script reference. site protected forms authentication.
<ajaxtoolkit:toolkitscriptmanager id="scriptmanager1" runat="server" enableviewstate="false" asyncpostbacktimeout="3600" scriptmode="auto" enablepagemethods="true" combinescripts="true" enablecdn="true" > <services> <asp:servicereference path="~/webservices/portalwebservice.asmx" /> </services> </ajaxtoolkit:toolkitscriptmanager>
when try , call webservice method using javascript , auth ticket still valid hunky dory , response fine. if auth ticket expired when javascript call made server pops window asking me authenticate.
the server responding 401 request basic authentication! when enter valid information absolutely nothing pop window again.
i've attached on error handler service method call , fired after user has been prompted window doesn't work. how fix this? needs either report error onerror handler or redirect user (which not happen).
fixed disabling basic , digest authentication in iis (forms authentication enabled). once did this, used forms authentication correct behavior.
Comments
Post a Comment