We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

503 service unavailable while processing excel file after 60 secondsRSS

2 replies

Last post Mar 01, 2021 01:40 AM by samwu

‹ Previous Thread|Next Thread ›
  • 503 service unavailable while processing excel file after 60 seconds

    Feb 26, 2021 04:06 PM|alich65|LINK

    I have an ASP.NET MVC Web Application which user can upload an excel file and application reads the file and inserts its data to SQL Server, The problem is when the excel file is large and request takes more than 60 seconds causes IIS 503 service unavailable. I also set the following in web.config:

    <httpRuntime targetFramework="4.7.2" maxRequestLength="102400" executionTimeout="3600"
    useFullyQualifiedRedirectUrl="false"
    minFreeThreads="8"
    minLocalRequestFreeThreads="4"
    appRequestQueueLimit="100" />

    How can i resolve the problem?
  • Re: 503 service unavailable while processing excel file after 60 seconds

    Feb 26, 2021 04:35 PM|lextm|LINK

    alich65

    I have an ASP.NET MVC Web Application

    It is time to redesign your web application, so that such time consuming tasks go off to separate processes (a pool of background processes for instance).

    Lex Li
    Want to have a chat on the issues you meet? Find me at https://booktime.xyz/p/lextm
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: 503 service unavailable while processing excel file after 60 seconds

    Mar 01, 2021 01:40 AM|samwu|LINK

    Hi alich65,

    alich65

    <httpRuntime targetFramework="4.7.2" maxRequestLength="102400" executionTimeout="3600"
    useFullyQualifiedRedirectUrl="false"
    minFreeThreads="8"
    minLocalRequestFreeThreads="4"
    appRequestQueueLimit="100" />

    There are many reasons for this error, you can try the following solutions:

    1. In IIS go to the Application Pools under the Server, then find the correct application pool for your web site, and click on it. On the advanced settings menu to the right, select Identity and change it and enter new user and password. Click on your application pool again, and select recycle to restart it.
    2. Click on application pools under the tree with your machine name, on the right side, click on advanced settings, in Process Model change the "Load User Profile" to false, Start your apllication and restart your IIS.

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
‹ Previous Thread|Next Thread ›