<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Programming with .NET - General</title><link>http://forums.silverlight.net/forums/17.aspx</link><description>General discussions around authoring Silverlight .NET applications.</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: Silverlight 2 WCF Service returns 404 with upload of image</title><link>http://forums.silverlight.net/forums/thread/215689.aspx</link><pubDate>Mon, 04 May 2009 23:31:41 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:215689</guid><dc:creator>lepipele</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/215689.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=215689</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks for great topic&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Silverlight 2 WCF Service returns 404 with upload of image</title><link>http://forums.silverlight.net/forums/thread/185295.aspx</link><pubDate>Mon, 09 Mar 2009 20:20:09 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:185295</guid><dc:creator>rdlecler</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/185295.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=185295</wfw:commentRss><description>&lt;p&gt;Billiant! I have been&amp;nbsp;stuck&amp;nbsp;on this problem for the past 20 hours.&amp;nbsp;I was modifying some LINQ + SQL + WCF + Silverlight + DataGrid code I found on the &lt;a class="" title="Swiss MSDN Team Blog" href="http://blogs.msdn.com/swiss_dpe_team/archive/2008/04/04/crud-operations-with-optimistic-locking-using-silverlight-2-beta1-wcf-and-linq-to-sql-inserts-updates-and-deletes.aspx"&gt;Swiss&amp;nbsp;MSDN Team Blog&lt;/a&gt;&amp;nbsp;and I was getting a very unhelpful error when uploading a new image (which happened to be a 1KB larger):&lt;/p&gt;
&lt;p&gt;&amp;quot;System.ServiceModel.CommunicationException was unhandled by user code: The remote server returned an error: NotFound&amp;quot;&lt;/p&gt;
&lt;p&gt;I first thought it wasn&amp;#39;t updating the write, and then I thought it might have been a clientaccesspolicy.xml issue. Eventually I came across a IE plugin for logging http errors (&lt;a class="" title="Link" href="http://projects.nikhilk.net/WebDevHelper/"&gt;link&lt;/a&gt;), and found out that I was getting a 500 error caused by an insufficient&amp;nbsp;quota&amp;nbsp;for XmlDictionaryReaderQuota. The code I found had set the quota in the code, but not in the XML file. I&amp;#39;m posting the original error message below in case anyone is doing a search. One last thing, if you use the code from the Swiss Team Blog, there is also a bug with their &amp;quot;save customer data&amp;quot; button&amp;nbsp;-- apparently the call to &amp;quot;LinqHelper.GetModifiedsObectsOnly()&amp;quot; unloads the datasource on the datagrid, so you need to reload the datasource in the&amp;nbsp;&amp;quot;&lt;font color="#3c3c3c"&gt;client_SaveCustomersCompleted()&lt;/font&gt;&amp;quot; call back method.&amp;nbsp;Otherwise&amp;nbsp;all the non-update entries will be pointing to null values in the code, but are still visible in the grid.&lt;/p&gt;
&lt;p&gt;//Original error message:&lt;/p&gt;
&lt;p&gt;System.ServiceModel.CommunicationException was unhandled by user code&lt;br /&gt;&amp;nbsp; Message=&amp;quot;The remote server returned an error: NotFound&amp;quot;&lt;br /&gt;&amp;nbsp; StackTrace:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at SilverlightApplication4.ServiceReference2.Service2Client.Service2ClientChannel.EndSaveVectors(IAsyncResult result)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at SilverlightApplication4.ServiceReference2.Service2Client.SilverlightApplication4.ServiceReference2.IService2.EndSaveVectors(IAsyncResult result)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at SilverlightApplication4.ServiceReference2.Service2Client.OnEndSaveVectors(IAsyncResult result)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)&lt;br /&gt;&amp;nbsp; InnerException: System.Net.WebException&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Message=&amp;quot;The remote server returned an error: NotFound&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StackTrace:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Net.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Net.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InnerException: System.Net.WebException&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Message=&amp;quot;The remote server returned an error: NotFound&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StackTrace:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Net.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Net.BrowserHttpWebRequest.&amp;lt;&amp;gt;c__DisplayClass5.&amp;lt;EndGetResponse&amp;gt;b__4(Object sendState)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Net.AsyncHelper.&amp;lt;&amp;gt;c__DisplayClass2.&amp;lt;BeginOnUI&amp;gt;b__0(Object sendState)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InnerException: &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Silverlight 2 WCF Service returns 404 with upload of image</title><link>http://forums.silverlight.net/forums/thread/136448.aspx</link><pubDate>Mon, 24 Nov 2008 17:27:50 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:136448</guid><dc:creator>fallen888</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/136448.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=136448</wfw:commentRss><description>&lt;p&gt;I ran into the same exact issue and eventually figured out the problem, but the biggest question is... How do we programmatically handle the appropriate WCF messages (and not these vague and very unhelpful ones)?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Re: Silverlight 2 WCF Service returns 404 with upload of image</title><link>http://forums.silverlight.net/forums/thread/86745.aspx</link><pubDate>Thu, 04 Sep 2008 17:45:25 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:86745</guid><dc:creator>Brauliod</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/86745.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=86745</wfw:commentRss><description>&lt;p&gt;Excellent autoself responding post !!!!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Many developers will find this issue sooner or later, and ... it&amp;#39;s a bit hard to&amp;nbsp;have advance skills on&amp;nbsp;Silverlight, WCF, ADO .net entity Framework...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; This tip save my day :-), Are you planning to post it in a blog?&lt;/p&gt;&lt;strike&gt;&lt;/strike&gt;</description></item><item><title>Re: Silverlight 2 WCF Service returns 404 with upload of image</title><link>http://forums.silverlight.net/forums/thread/41269.aspx</link><pubDate>Wed, 26 Mar 2008 16:12:47 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:41269</guid><dc:creator>bradtpm</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/41269.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=41269</wfw:commentRss><description>&lt;p&gt;I have found the problem. I downloaded the Windows SDK to get the SvcConfigurationManager utility and enable logging of the WCF messages.&lt;/p&gt;
&lt;p&gt;In the message being returned I finally found an error I could actually understand instead of a 404.&lt;/p&gt;
&lt;p&gt;The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation &amp;#39;TestSize&amp;#39;. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 8503&lt;/p&gt;
&lt;p&gt;&amp;nbsp;It was as I thought, the server&amp;#39;s incoming buffer needed to be increased. The problem though is I did set this in the Web.Config. What I didn&amp;#39;t set was the &amp;quot;bindingConfiguration&amp;quot; property to tell the binding to use the new settings. Here&amp;#39;s the correct configuration settings:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bindings&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;basicHttpBinding&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;binding name=&amp;quot;ServicesBinding&amp;quot; maxReceivedMessageSize=&amp;quot;2000000&amp;quot; maxBufferSize=&amp;quot;2000000&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;readerQuotas maxArrayLength=&amp;quot;2000000&amp;quot; maxStringContentLength=&amp;quot;2000000&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/binding&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/basicHttpBinding&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bindings&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;services&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;service behaviorConfiguration=&amp;quot;WCFServices.DesignerBehavior&amp;quot; name=&amp;quot;WCFServices.Designer&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;endpoint address=&amp;quot;&amp;quot; bindingConfiguration=&amp;quot;ServicesBinding&amp;quot; binding=&amp;quot;basicHttpBinding&amp;quot; contract=&amp;quot;WCFServices.IDesigner&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;identity&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dns value=&amp;quot;localhost&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/identity&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/endpoint&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;endpoint address=&amp;quot;mex&amp;quot; binding=&amp;quot;mexHttpBinding&amp;quot; contract=&amp;quot;IMetadataExchange&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/service&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/services&amp;gt;&lt;/p&gt;</description></item><item><title>Re: Silverlight 2 WCF Service returns 404 with upload of image</title><link>http://forums.silverlight.net/forums/thread/41049.aspx</link><pubDate>Wed, 26 Mar 2008 03:42:15 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:41049</guid><dc:creator>bradtpm</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/41049.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=41049</wfw:commentRss><description>&lt;p&gt;I have done another test. It seems to be the parameter size that I pass to the Service.&lt;/p&gt;
&lt;p&gt;I made a test Service:&lt;/p&gt;&lt;font size="2"&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; TestSize(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; test)&lt;br /&gt;{&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; string&lt;/font&gt;&lt;font size="2"&gt; blah = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;font size="2"&gt;I passed a 300 KB string to it and received a 404 error. I did some searching on this and found that it&amp;#39;s a client error about EndPointNotFound.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;If I pass &amp;quot;hello&amp;quot; the Service works. I have set the message size on the client and server yet I still get this error.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Client:&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;blockquote&gt;System.ServiceModel.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;BasicHttpBinding&lt;/font&gt;&lt;font size="2"&gt; Binding = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;BasicHttpBinding&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;BasicHttpSecurityMode&lt;/font&gt;&lt;font size="2"&gt;.None);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;Binding.MaxBufferSize = 2000000;&lt;/p&gt;
&lt;p&gt;Binding.MaxReceivedMessageSize = 2000000;&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;EndpointAddress&lt;/font&gt;&lt;font size="2"&gt; Address = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;EndpointAddress&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;http://localhost/PrintStoreWCFService/Designer.svc&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;DesignerClient = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; DesignerServiceReference.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;DesignerClient&lt;/font&gt;&lt;font size="2"&gt;(Binding, Address);&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;font size="2"&gt;Server:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;system.serviceModel&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;bindings&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;basicHttpBinding&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;binding&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;name&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ServicesBinding&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;maxReceivedMessageSize&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;2000000&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;readerQuotas&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;maxArrayLength&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;2000000&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;binding&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;basicHttpBinding&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;br /&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;bindings&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;serviceHostingEnvironment&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;aspNetCompatibilityEnabled&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;br /&gt;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;services&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;service&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;behaviorConfiguration&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;WCFServices.DesignerBehavior&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;name&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;WCFServices.Designer&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;endpoint&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;address&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;binding&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;basicHttpBinding&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;contract&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;WCFServices.IDesigner&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;identity&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;dns&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;value&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;localhost&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;identity&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;endpoint&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;service&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;services&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;behaviors&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;serviceBehaviors&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;behavior&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;name&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;WCFServices.DesignerBehavior&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;serviceMetadata&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;httpGetEnabled&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;serviceDebug&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;includeExceptionDetailInFaults&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;behavior&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;br /&gt;&amp;nbsp; &amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;serviceBehaviors&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;behaviors&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;br /&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;system.serviceModel&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;</description></item><item><title>Silverlight 2 WCF Service returns 404 with upload of image</title><link>http://forums.silverlight.net/forums/thread/40982.aspx</link><pubDate>Tue, 25 Mar 2008 21:48:03 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:40982</guid><dc:creator>bradtpm</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/40982.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=40982</wfw:commentRss><description>&lt;p&gt;I can send an Image byte array that is less than 16 KB to my WCF Service. If I send anything bigger than that I get the following error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;An exception of type &amp;#39;System.ServiceModel.ProtocolException&amp;#39; occurred in System.ServiceModel.dll but was not handled in user code&lt;/p&gt;
&lt;p&gt;Additional information: The remote server returned an unexpected response: (404) Not Found.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This error makes no sense as the only thing that I changed was the image. I have tested this with other files and receive the same thing. I have also set the Max Buffer size to 20000000. Anyone know what the problem could be?&lt;/p&gt;
&lt;p&gt;I have not set the max received message on the WCF Service Web.Config file. Do I need to change that? This is only a guess as the error message makes no sense.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Here&amp;#39;s some code:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // WCF&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.ServiceModel.BasicHttpBinding Binding = new BasicHttpBinding(BasicHttpSecurityMode.None);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Binding.MaxBufferSize = 200000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Binding.MaxReceivedMessageSize = 200000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EndpointAddress Address = new EndpointAddress(&amp;quot;&lt;a href="http://localhost/WCFService/Designer.svc"&gt;http://localhost/WCFService/Designer.svc&lt;/a&gt;&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DesignerServiceReference.DesignerClient DesignerClient = null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DesignerClient = new DesignerServiceReference.DesignerClient(Binding, Address);&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;// Upload an Image to the WCF Service&lt;br /&gt;private void AddImageUserControl_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Send&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stream Stream = (System.IO.Stream)ImageAdd.OpenFileDialog.SelectedFile.OpenRead();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] Buffer = new byte[Stream.Length];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stream.Read(Buffer, 0, (int)Stream.Length);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stream.Dispose();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Stream.Close();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DesignerClient.SaveImageAsync(Buffer);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DesignerClient.SaveImageCompleted += new EventHandler&amp;lt;System.ComponentModel.AsyncCompletedEventArgs&amp;gt;(SaveImage_Completed);&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The error occurs on the following line and the service code never gets executed:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void EndSaveImage(System.IAsyncResult result) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object[] _args = new object[0];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;base.EndInvoke(&amp;quot;SaveImage&amp;quot;, _args, result);&lt;br /&gt;&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;brad&lt;/p&gt;</description></item></channel></rss>