阅读背景:

当我硬编码一个ASP。NET HTTP-StatusCode到401,我不断被弹出登录页面?

来源:互联网 

I've got an API setup. When the user provides an invalid/missing API key, I'm trying to set the Response.StatusCode to 401, something keeps bouncing me to my login page. It's an API ... so I don't want that. I wish to send them the json error message with the code being 401. I've got an API setup. When the user provides a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: