[quoted text, click to view] On 26 Sep., 19:22, Peter Duniho <NpOeStPe...@NnOwSlPiAnMk.com> wrote:
> tobiwankenobi wrote:
> > Hello everybody,
> > I try to send big files to a webservice using VS 2005 and WSE 3.0
> > (mtom enabled). Up to 120 MB erverythink works fine. But if I try a
> > 140 MB File I get the following exeption:
>
> > System.Net.WebException: The underlying connection was closed: An
> > unexpected error occurred on a send.
> > InnerExeption:
> > An operation on a socket could not be performed because the system
> > lacked sufficient buffer space or because a queue was full
>
> > [...]
> > nothing helps. Please Help me! I am running out of ideas and I think I
> > read all soltuion they can be found by google. If you need a example
> > Webservice and Client I send it emediatly in a Mail to you.
>
> You should post a concise-but-complete example of code that reliably
> reproduces the problem. Concise means that you including _nothing_
> except that which is strictly required to reproduce the problem, and
> complete means that no additional code needs to be added in order to
> compile and run the example.
>
> This being a networking issue, you should at a minimum be very clear
> about what is going on at each end, and preferably provide the code for
> each end. At the very least, you should be specific about which end is
> generating the error; from your post it sounds like the client end, but
> you're not actually clear about that IMHO.
>
> From the exception, I suspect that you have some sort of problem where
> you are not properly dealing with the flow of data. But without a code
> example, it's hard to say for sure.
>
> Pete- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
Hello Pete,
here the complete code witch I am testing.
CLIENT
static void Main(string[] args)
{
try
{
FileStream profileStream = File.Open("C:\
\SomeLargeFile);
byte[] srcProfile = new byte[profileStream.Length];
profileStream.Read(srcProfile, 0,
(int)profileStream.Length);
ServicePointManager.MaxServicePoints = 200000;
ServicePointManager.MaxServicePointIdleTime = 100000;
WebReference.Service1Wse sc = new
ClientTest.WebReference.Service1Wse();
sc.Timeout = 500000;
sc.RequireMtom = true;
sc.HelloWorld(srcProfile);
}
catch (Exception e )
{
Console.WriteLine(e.StackTrace + " - " + e.Message
+ " - " + e.Source + " - " + e.InnerException.Message + " - " +
e.InnerException.StackTrace + " - " + e.InnerException.Source + " -
");
}
}
}
SERVER
[WebService(Namespace = "
http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld(byte[] file)
{
File.WriteAllBytes("C:/Temp/Possible.test", file);
return "Hello World";
}
}
Thatsn all. A simple Test. I think the problem is on the client side
because sending a largeFile with a java client (xFire - mtom enabled)
is not a problem! If you need the hole project for testing please let
me know.
Thanks for your help.