从IIS上的ASP.NET Core应用程序请求超时

编程入门 行业动态 更新时间:2024-10-25 21:17:11
本文介绍了从IIS上的ASP.NET Core应用程序请求超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我从我的ASP.NET核心应用程序向第三方API发出Web请求。

I make a web request to a third-party api from my ASP.NET Core application.

  • 当app单独运行时,请求成功。
  • 当应用程序在同一服务器上的IIS中运行时,请求超时。
  • 通过RestSharp客户端从Hangfire定期作业向Asana API端点(HTTPS)发出请求。所有自己的应用程序页面都可以通过IIS获得,但应用程序无法提出任何请求。

    Request is made from a Hangfire recurring job to Asana API endpoint (HTTPS) via RestSharp client. All the own app's pages are available through IIS, but app cannot make any requests.

    我应该在哪里查看以及要调试什么来解决这个问题?

    Where should I look and what to debug to solve this problem?

    推荐答案

    IIS行为是由web.config驱动的,我已配置为处理请求< 20分钟指定 requestTimeout =00:20:00:

    IIS behavior is driven by the web.config, I have configured to deal with request < 20 min specifying requestTimeout="00:20:00":

    <aspNetCore requestTimeout="00:20:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"> <environmentVariables> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="staging" /> <!-- value could be "development", "staging" or "production"--> </environmentVariables> </aspNetCore>

    更多推荐

    从IIS上的ASP.NET Core应用程序请求超时

    本文发布于:2023-11-15 21:18:48,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1598038.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:应用程序   ASP   IIS   Core   NET

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!