Authentication failed during call webmethod from jquery.ajx with AspNet.FriendlyUrls and AspNet.Identity

前端 未结 2 1714
眼角桃花
眼角桃花 2020-12-03 21:42

If I call webmethod from jQuery.Ajax with installed Nuget packages Microsoft.AspNet.FriendlyUrls v 1.0.2 and Microsoft.AspNet.Identity v.1.0.0., then I get the data object,

相关标签:
2条回答
  • 2020-12-03 22:00

    It is not exactly the same use case, but worth mentioning if you are using a web service and had the "Authentication failed" message. Please check that your web service has the attribute "[System.Web.Script.Services.ScriptService]". This allows the web service to be called from script.

    Example:

    [System.Web.Script.Services.ScriptService]
    public class WS_Default : System.Web.Services.WebService
    {
        ...
    }
    
    0 讨论(0)
  • 2020-12-03 22:18

    In your App_Start folder, within your RouteConfig....

    Comment out the following line or change its RedirectMode:

    //settings.AutoRedirectMode = RedirectMode.Permanent;
    
    0 讨论(0)
提交回复
热议问题