Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Silverlight 2.0 Display Database Images Service Max Size Exeeded
8 replies. Latest Post by diekus on April 17, 2008.
(0)
kemaltolga
Member
140 points
113 Posts
03-11-2008 6:20 PM |
hi:
I am simply trying to display database images in silverlight. I am using a WCF service, like recommended but they the following error message.
An exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.dll but was not handled in user code
Additional information: [MaxReceivedMessageSizeExceeded]Arguments:Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.ServiceModel.dll&Key=MaxReceivedMessageSizeExceeded
Below is part of the web.config file and .ClientConfig file
<
</
.clientconfig file=================================================
swildermuth
Star
8320 points
1,546 Posts
03-12-2008 6:35 AM |
Bad news...good news....
Bad news...the clientconfig isn't being read in the Beta...its being created and ignored right now. This is expected to change in Beta 2 or RTM.
Good news, when you create your Binding, just add the options with the new sizes and it works (my http://www.silverlightdata.com example does this and it works fine).
kgvinayak
12 points
1 Posts
03-12-2008 9:44 AM |
I was getting into the same issue.
Added below is the code snippet for the same
BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; // int's max size binding.MaxBufferSize = 2147483647; // int's max size
This binding has to go into the serviceClient's constructor along with EndPointAddress.
03-13-2008 6:05 AM |
Exactly...
ravi486
46 points
36 Posts
03-17-2008 9:01 AM |
Hi
I am doing that exactly but i am unable to cross the limit how is exactly done could u share any kind of code snippet it will be helpful for us
have a lokk at what i am doing and correct me if i am doing any thing wrong
HttpWebRequest
HttpWebResponse response = request.EndGetResponse(asyncResult) as HttpWebResponse;
binding.MaxReceivedMessageSize = 2147483647;
binding.MaxBufferSize = 2147483647;
ServiceReference1.
proxy.WorksAsync(ar);
}
It is throwing me a error
An exception of type System.ServiceModel.ProtocolException occured in System.serviceModel.dll
Additional information [ UnexpectedHTTPCode]
Arguments :Not found
Thx in advance
Ravi
senthilk...
2 points
04-08-2008 4:35 AM |
The problem is your WCF Webservice is not hosted in IIS and it is hosted in a port which for a client web application it is a separate domain as of now(its my understatnding). The solution is host your WCF Webservice in IIS as well as your client Web Application. Also copy the below CrossDomain.xml and clientaccesspolicy.xml from the link http://silverlight.net/forums/t/12495.aspx in Root Web Directory(c:\Inetpub\WWWRoot).
It doesnt work without copying the xml files.
cschep
10 points
12 Posts
04-16-2008 2:49 PM |
You probably got this figured out already, but I just wanted to chime in that I was dealing with all of this and getting similar errors.
First the max size exceeded was a pain, but that was a pretty quick fix by manually creating the binding and endpoint. Thanks for that.
But, when I was doing that I created my endpoint incorrectly. I am developing in VS2008 and using the built-in webserver to test all of this, so all the talk about cross-domain calls failing didn't seem right.
It turns out I just declared my endpoint incorrectly.
I was doing this:
EndpointAddress endPoint = new EndpointAddress("http://localhost:53114/SlideShow_Web/Service1.svc");
When this was correct:
EndpointAddress endPoint = new EndpointAddress("http://localhost:53114/Service1.svc");
So, just a heads up. Give your project a static PORT in the properties page, and make sure you're pointing to your service correctly!
Thanks for the help getting Silverlight to consume these WCF services. LINQ is cool stuff for sure.
diekus
173 points
80 Posts
04-17-2008 11:34 AM |
Hi, always in the same subject.... how much is too much?
This maxInt.... how much can it take?
04-17-2008 3:57 PM |
ok, now I'm a believer.... it can take A LOT...