MVC + Ajax call to Controller Loses Authentication

旧巷老猫 提交于 2019-12-07 12:05:11

问题


I've seen similar issues in some posts but none of the answers have helped yet. My MVC app has a few AJAX/JSON response methods in one controller, and the calls get to destination but it doesn't work in IE or Chrome, and in mozilla it does, but Firebug returns a very strange set of 3 attempts (all return 401 error) but the last one does actually work!

My App has windows authentication, how can I extend this to my Ajax methods? the rest of the app works fine. I've tried bypassing the 401 by returning 200 Status from Global.asax (Application_EndRequest) but continues to do the same. Basically all of my Ajax methods have the same problem.

Here's an image from my firebug console.

来源:https://stackoverflow.com/questions/5004765/mvc-ajax-call-to-controller-loses-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!