Click here to Skip to main content
15,886,712 members

problem uploading large file to a webservice .net3.5

ashkan sirous asked:

Open original thread
Dear Experts,

I have a from that uploads files to data table(in session) and then after clicking on send button it calls a webservice dynamically and uploads the file to data base.

I've set the request length and etc for both application and webservice to 2GB:

HTML
<httpRuntime executionTimeout="10000" maxRequestLength="2000000"/>


Every thing works fine until the file size reaches to 100MB

After that, the application returns me an exception:

Exception has been thrown by the target of an invocation.
InnerException: The underlying connection was closed: An unexpected error occurred on a send.


I've a custom exception on my webservice codes so I know it will never enter the codes of webservice.

I should add that the call web service dynamically is a dll that I used.... can anybody help me?

[edit] little typo and format[/edit]
[improve] I should add that the webservice and the Prosentation are on the same server, also I've checked this with UI on my local computer to call that webservice[/improve]
[improve2]I'm using .net 3.5[/improve2]
----------------------------
[improve 3] this is full error text
System.Net.WebException occurred
  Message="The underlying connection was closed: An unexpected error occurred on a send."
  Source="System.Web.Services"
  StackTrace:
       at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
       at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at NHTC.WA.DMS_Maroun.wsprojFileInsert.WSManageDMSProject.InsertFile(DataSet dsInput, String userName) in C:\NHTC_TFS_WorkSpace\OrganizationPortal\UI\DMS_Maroun\NHTC.WA.DMS_Maroun\NHTC.WA.DMS_Maroun\Web References\wsprojFileInsert\Reference.cs:line 2212
       at NHTC.WA.DMS_Maroun.iMultipleuploads_M.insertNewFiles() in C:\NHTC_TFS_WorkSpace\OrganizationPortal\UI\DMS_Maroun\NHTC.WA.DMS_Maroun\NHTC.WA.DMS_Maroun\iMultipleuploads_M.aspx.cs:line 302
  InnerException: System.IO.IOException
       Message="Unable to write data to the transport connection: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full."
       Source="System"
       StackTrace:
            at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers)
            at System.Net.Connection.Write(ScatterGatherBuffers writeBuffer)
            at System.Net.ConnectStream.ResubmitWrite(ConnectStream oldStream, Boolean suppressWrite)
       InnerException: System.Net.Sockets.SocketException
            Message="An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full"
            Source="System"
            ErrorCode=10055
            NativeErrorCode=10055
            StackTrace:
                 at System.Net.Sockets.Socket.MultipleSend(BufferOffsetSize[] buffers, SocketFlags socketFlags)
                 at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers)
            InnerException: 
[/improve]
Tags: C#, .NET (.NET 3.5), ASP.NET, File

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900