MTOM!

V

Vai2000

I am using DIME currently was planning to upgrade to MTOM. After following
the simple example from their SDK things don't seem to work! I did all the
WSE settings through the wizard.

Client CodeWSEHost.Service serviceproxy = new WSEHost.Service();

// Specify that MTOM encoding must be used.

serviceproxy.UseDefaultCredentials = true;

// Communicate with the Web service to get the requested file.

byte[] response = serviceproxy.GetFile("foo.txt");

MemoryStream memory = new MemoryStream(response);

// Display the file in a picture box.

//pictureBox1.Image = System.Drawing.Image.FromStream(memory);

using (StreamWriter sw = new StreamWriter(@"C:\vtemp\FooSvc.txt"))

{

using (StreamReader sr = new StreamReader(memory))

{

sw.Write(sr.ReadToEnd());

}

}



Server Codepublic byte[] GetFile(string fileName){
byte[] response;

String filePath = AppDomain.CurrentDomain.BaseDirectory + @"App_Data\" +
fileName;

response = File.ReadAllBytes(filePath);

return response;

}
 
T

Tamas Demjen

Vai2000 said:
I am using DIME currently was planning to upgrade to MTOM. After following
the simple example from their SDK things don't seem to work! I did all the
WSE settings through the wizard.

What's the problem exactly? Do you get a compile error, runtime error,
or the SOAP envelope just uses Base64 instead of MTOM?

You could try to follow the directions here:
http://msdn.microsoft.com/library/d...html/4344d43e-ceb4-43a9-8f8c-6a3f89f786bd.asp
http://msdn.microsoft.com/library/d...html/b4b19453-e4e4-4056-906d-72504ed8c0df.asp


I actually had to make a simple modification. The guide says "In
Solution Explorer, right-click the project name, and then click WSE
Settings 3.0." That fails with an error message for me, and it's
actually a bug in the WSE integration with Visual Studio. However, I was
able to open the WSE Settings manually: Programs -> Microsoft WSE 3.0 ->
Configuration Tool, then I could save the settings to the project
directory. It's all just a matter of configuration, nothing else.

Tom
 
V

Vai2000

Technically no compilation but it just doesn't work as expected...to
outperform DIME
I tried downloading a 20MB file and it was just stuck...Had changed all the
httpRuntime settings etc...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top