> 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.
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