I have some code that pulls data from SQL DB, then loops through the records to generate a list<list<string>>, which will be written to a excel file.
The code runs fine on my local, from VS, but on the live server, I get "Connection was reset" error in chrome.
Initially it worked fine for some 300- 500 recrds. But when i try to fetch a month or week data( means try to fetch more number of records - say some 2000 records and above), I get this error.
Plz provide some suggestions. I tried including "<httpRuntime maxRequestLength="2000000000" executionTimeout="999999999" />"
The code runs fine on my local, from VS, but on the live server, I get "Connection was reset" error in chrome.
According to your description, I don’t know exactly where the problem is. So I suggest you could get more error details via F12 WebDeveloper tool.
Based on your some attempts, I suggest you could check your IIS web server settings. Because the code runs fine on your local. So I suggest you could set the connection timeout and in IIS
For IIS7.x
Site-Advanced Settings-Behavior-Connection limits
General speaking, some cloud env will restrict the configurations even if you set the web.config. So I suggest you could post information about the live server you are using.
Any feedback would be appreciate.
Best Regards,
Abraham
.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.
None
0 Points
1 Post
Connection was reset error while fetching large data from server
May 28, 2018 05:04 AM|Avarka|LINK
I have some code that pulls data from SQL DB, then loops through the records to generate a list<list<string>>, which will be written to a excel file.
The code runs fine on my local, from VS, but on the live server, I get "Connection was reset" error in chrome.
Initially it worked fine for some 300- 500 recrds. But when i try to fetch a month or week data( means try to fetch more number of records - say some 2000 records and above), I get this error.
Plz provide some suggestions. I tried including "<httpRuntime maxRequestLength="2000000000" executionTimeout="999999999" />"
and also
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2000000000"/>
</requestFiltering>
</security>
in web.config
But in vain.
Member
740 Points
321 Posts
Re: Connection was reset error while fetching large data from server
May 30, 2018 07:24 AM|Abraham Qian|LINK
HI Avarka,
According to your description, I don’t know exactly where the problem is. So I suggest you could get more error details via F12 WebDeveloper tool.
Based on your some attempts, I suggest you could check your IIS web server settings. Because the code runs fine on your local. So I suggest you could set the connection timeout and in IIS
For IIS7.x
Site-Advanced Settings-Behavior-Connection limits
General speaking, some cloud env will restrict the configurations even if you set the web.config. So I suggest you could post information about the live server you are using.
Any feedback would be appreciate.
Best Regards,
Abraham