Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7693623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:07:58+00:00 2026-05-31T21:07:58+00:00

Environment: -SharePoint 2010 foundation -Claim based authentication -Execution time out in web.config is set

  • 0

Environment:
-SharePoint 2010 foundation
-Claim based authentication
-Execution time out in web.config is set to 3600

Overview:
We have an excel export functionality where we connect to AD and SQL databases to fetch Users and their related data for a perticular Organization Unit (OU)in Active Directory.
We have on OU in AD which has got around 1400 users in it. We are using Open and Closed xml to generate excel file which works fine and takes about 11-14 minutes to generate a file on the server on following path
C:\inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectyrName\Excel\FileName.xlsx

Immediately after generating a file we have following piece of code which would read file from server and dump it on output steam and presents a file ope-save as dialog box in browser to end user.

Problem Description:
When an Organization has less number of users and it does not take more than 5-6 minteus to generate the file on server, following piece of code successfully downloads the file on browser. But when for above mentioned OU where we have 1400 users the reponse.writefile function fails and in browse we get to see ‘Browse can not display this web page’ (when fiddler was on we found it gives – http 504 error). Surpricingly if we perform this export from the server itself (i.e browse the web site on server) it downloads without issue.

protected void lnkbtnDownloadFile_Click(object sender, EventArgs e)
{

    String fileName = @"C:\inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectyrName\Excel\540KBFileWhichFails.xlsx";
        //File size is hardly ~500 KB
        //Wait for around 12 minutes, to mimic a scenario of file generation which takes time on staging and prod. environment.
        System.Threading.Thread.Sleep(720000);
        try
        {
        if (fileName != "")
                {
                    var file = new FileInfo(fileName);

                    if (file.Exists)
                    {
                        Response.Clear();
                        Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
                        Response.AddHeader("Content-Length", file.Length.ToString());
                        Response.ContentType = "application/octet-stream";
                        Response.WriteFile(file.FullName);
                        Response.End();
                    }
                    else
                        Response.Write("This file does not exist.");
                }
            }
            catch (Exception ex)
            {
                //This would usually give thread aboart exception but thats expected.
            }
}

we dont see any error in ULS logs, event logs specific to this behavior.
Please note , response.TransmitFile also gives same behaviour.

any idea ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:08:00+00:00Added an answer on May 31, 2026 at 9:08 pm

    I figured out the issue, It was an issue with the Idle time out issue in the Hardware load balancer we where using. Default value in load balancer was 0 which meant 11 minutes and my file generation was taking longer than that which caused this issue. Increasing load balancer idle time out issue seems to be solutions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to edit the web.config file on a live Sharepoint environment, but I'm
We are planning to create two sharepoint web applications using SharePoint 2010 Enterprise Edition.
I have a Java client that consumes SharePoint 2010 standard web services (sitedata.asmx, permissions.asmx,
We have the sharepoint 2010 environment with Document ID's enabled. Given (part of) a
I need advise on what can be best way to setup/configure SHAREPOINT 2010 Environment
In my environment, my SharePoint 2010 is running on Windows Server 2008 R2 with
I am trying to build CMS using sharepoint foundation 2010 or drupal. We already
i have the following Environment: SharePoint server 2010 Windows server 2008 R2 SQL Server
I have SharePoint Designer 2010 Workflows in production environment and we need to make
I am currently working on a SharePoint 2010 project where the environment is setup

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.