How to increase the maxlenght in web.Config and App.Config to uplaod the image?

eruption

New Member
In my program I am trying to save image to database. I am getting an exception\[quote\] protocol exception was unhandled" The remote server returned an unexpected response (400) Bad Request\[/quote\]I looked up on google and I found to change maximum message length in \[code\]app.config\[/code\]. I tried that but even that did not work. Here is my \[code\]app.config\[/code\]\[code\] <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IService1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="524288" maxBufferPoolSize="524288" maxReceivedMessageSize="524288" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:55750/Service1.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1" contract="PeerService.IService1" name="BasicHttpBinding_IService1" /> </client> </system.serviceModel> </configuration>\[/code\]Can you please tell me how to fix it?I am really stuck in this problem....
 
Top