Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2007

Tip: Looking for answers? Try searching our database.

WSE 3.0 Large files - Error - Tried all but nothing helps

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tobiwankenobi - 26 Sep 2007 16:26 GMT
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

I tried :
keeAlive = false
HttpVersion = 1.0
x-over direct on the server (win server 2003 )
ervery possible atribute in the web.config (MaxRequestLength ,TimeOut
etc.)
differnt Clients
changing and adding reg adtributes

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.

Thanks for your help
Peter Duniho - 26 Sep 2007 18:22 GMT
> Hello everybody,
> I try to send big files to a webservice using VS 2005 and WSE 3.0
[quoted text clipped - 11 lines]
> 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
tobiwankenobi - 27 Sep 2007 09:33 GMT
> > Hello everybody,
> > I try to send big files to a webservice using VS 2005 and WSE 3.0
[quoted text clipped - 31 lines]
>
> - 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.
Kevin_E - 26 Sep 2007 22:26 GMT
You should take a look at the MSDN Book:
"Improving .NET Application Performance and Scalability"
Chapter 10 "Improving Web Service Performance"
Section: "Bulk Data Transfer"

The link to Chapter 10:
http://msdn2.microsoft.com/en-us/library/ms998562.aspx

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.