Tuesday, 15 September 2015

ASP.NET Uploading file over 300KB~ makes browser lose connection -



ASP.NET Uploading file over 300KB~ makes browser lose connection -

i've been running image-uploading site month now. haven't touched script lately , problem occurs never happened before, bigger uploads. when uploading file size exceeds 300 kb area, browser lose connection. lower upload immediatly, nail upload button in no moments you're redirected page of image.

the website address http://img.kfirprods.com/upload.aspx

as web.config, tried these suggestions alter execution time , maxrequestlength none of these helped, both modest sizes , unmodest sizes. default settings requestlength 4mb , user-server connection lost way before that. web.config

<configuration> <system.web> <compilation debug="true" targetframework="4.0"/> <httpruntime requestvalidationmode="2.0" /> <customerrors mode="off"/> <machinekey validationkey="eef33150a048d162d22cb36e1cb9956b148c7a4e6999d0f05b53d416d7a16f83823dd626f501dd3549d3e5dcb473634739d0ad9a07f71560946498c943a7586d" decryptionkey="0e95f75864047eb6322ea7d5246f2c1175d77a1b016f293c3baad000299a3dc8" validation="sha1" decryption="aes" /> </system.web> </configuration>

there others httpruntime settings default settings, should work - don't. however, happens server behaves if it's downwards down user exceeded little size of upload , homecoming after min or two. please, who's bit of expert - seek upload 'heavy' image , see if recognize problem.

put next in web.config file

<configuration> <system.web> <httpruntime maxrequestlength="4096" /> </system.web> </configuration>

by default value 4096 = 4mb. however, on shared hosting individual hosts might configure different value , limits size of file can upload.

further, can/cannot modify these settings depending on permissions given host.

asp.net file upload web-config connection

No comments:

Post a Comment