几次成功请求后,Web API突然返回403禁止 [英] Web API suddenly returns 403 forbidden after a few successfull requests
问题描述
我一直在与ASP.NET Web API一起开发离子应用程序.我正在使用该API进行所有数据传输.
I've been working on an ionic application in combination with an ASP.NET Web API. I'm using that API for all the data transfer.
我一直遇到问题:几次成功请求后,API突然返回403禁止.该API似乎有限制或某些限制,因为它发生在我在很短的时间内执行多个请求时.
I have been experiencing a problem: after a few successful requests, the API suddenly returns 403 forbidden. It seems like the API has a limitation or something, because it happens when I do multiple requests in a really short time.
关于此问题的奇怪之处在于,如果我在本地运行Web API,则可以正常工作,但是如果将其托管在外部IIS服务器上,则在几次请求后就会出现此问题.我在服务器上结束了临时修复该进程的过程.
The strange thing about this problem is that if I run the Web API locally it works perfectly fine, but if I host it on an external IIS server this problem shows up after a few requests. I end the process on the server to fix it temporary.
我希望你们中的一些人知道这个问题.
I hope some of you guys know this problem.
这将来可能会为我解决很多问题.
This might fix a lot for me in the future.
谢谢.
推荐答案
问题出在我的ASP.NET Web API的IIS管理器中.我必须增加动态IP限制(DIPR)的限制,因为API同时在几个请求之后返回了403错误.当我增加限制时,我注意到问题已解决.
The problem was inside my IIS Manager for the ASP.NET Web API. I had to increase the limit of my Dynamic IP Restrictions (DIPR), because the API returned an 403 error after a few requests at the same time. When I increased the limited I noticed that the problem was fixed.
这篇关于几次成功请求后,Web API突然返回403禁止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!