Hello, Am using a webservice to Upload image on the server. Am successfully able to upload .png image but not being able to upload a jpg image.
I found from one of forum that it requires set one of that property of Binding class object programatically. but the problem is binding object doesn't have that propert. That propert is MaxBufferSize. It can be seen in ServiceConfiguration file. setting
the value there doesn't work because silverlight does not read from that file.
Mark as "Answered" if this answers your question
Regards,
Nirav Patel,
Software Engineer
My Blog LinkedIn
I have tried with the solution you provide but still it is throwing some expection whenever i try to upload a large file. When i debug with large size buffer it is not reaching server side code. The error is:
An exception of type 'System.ServiceModel.ProtocolException' occurred in System.ServiceModel.dll but was not handled in user code
Additional information: [UnexpectedHttpResponseCode]
Arguments:Not Found
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.30223.0&File=System.ServiceModel.dll&Key=UnexpectedHttpResponseCode
Mark as "Answered" if this answers your question
Regards,
Nirav Patel,
Software Engineer
My Blog LinkedIn
nirav_2052003
Participant
794 Points
206 Posts
WCF BufferSize
Apr 03, 2008 04:52 AM | LINK
Hello, Am using a webservice to Upload image on the server. Am successfully able to upload .png image but not being able to upload a jpg image.
I found from one of forum that it requires set one of that property of Binding class object programatically. but the problem is binding object doesn't have that propert. That propert is MaxBufferSize. It can be seen in ServiceConfiguration file. setting the value there doesn't work because silverlight does not read from that file.
Regards,
Nirav Patel,
Software Engineer
My Blog
LinkedIn
mchlSync
Star
14968 Points
2799 Posts
Re: WCF BufferSize
Apr 03, 2008 05:53 AM | LINK
Have you tried using this sample and that sample?
Regards,
Michael Sync
Silverlight MVP
Blog : http://michaelsync.net
nirav_2052003
Participant
794 Points
206 Posts
Re: Re: WCF BufferSize
Apr 03, 2008 06:59 AM | LINK
I have tried with the solution you provide but still it is throwing some expection whenever i try to upload a large file. When i debug with large size buffer it is not reaching server side code. The error is:
An exception of type 'System.ServiceModel.ProtocolException' occurred in System.ServiceModel.dll but was not handled in user code
Additional information: [UnexpectedHttpResponseCode]
Arguments:Not Found
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.30223.0&File=System.ServiceModel.dll&Key=UnexpectedHttpResponseCode
Regards,
Nirav Patel,
Software Engineer
My Blog
LinkedIn
Allen Chen –...
Star
14215 Points
1854 Posts
Microsoft
Re: Re: WCF BufferSize
Apr 08, 2008 09:50 AM | LINK
Hi:
May it caused by server side restriction? Try to add this to Web.config of the WCF project (IIS host) to see if it works:
<system.web>
<httpRuntime maxRequestLength="1000000" executionTimeout="2000" />
</system.web>
Regards
Allen Chen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.