Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my client web.config file is as follows
XML
<system.servicemodel>
  <bindings>
    <basichttpbinding>
      <binding name="BasicHttpBinding_IService" maxreceivedmessagesize="2147483647" sendtimeout="00:10:00" maxbuffersize="2147483647" />
    </basichttpbinding>
  </bindings>
  <client>
    <endpoint address="http://localhost/MASS_WCF_Service/Service.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService" contract="MASS_WCF_Service.IService" name="BasicHttpBinding_IService">
    </endpoint>
  </client>
</system.servicemodel>

and service config file is
XML
<system.servicemodel>
  <behaviors>
    <servicebehaviors>
      <behavior>
        <servicedebug includeexceptiondetailinfaults="false" />
      </behavior>
    </servicebehaviors>
  </behaviors>
  <servicehostingenvironment multiplesitebindingsenabled="true" />
</system.servicemodel>
Plz help...i am new in wcf
Posted
Updated 6-Jan-15 1:07am
v3
Comments
Kornfeld Eliyahu Peter 6-Jan-15 2:16am    
413 means that the data you sent over the net is too large...However from the information you provided we can not help you, so please improve your question...

1 solution

I had the same problem a while ago with my WCF service. I managed to resolve it in the end by removing the name attribute from the binding element.

Replace
<binding name="BasicHttpBinding_IService" maxreceivedmessagesize="2147483647" sendtimeout="00:10:00" maxbuffersize="2147483647" />


with
<binding maxreceivedmessagesize="2147483647" sendtimeout="00:10:00" maxbuffersize="2147483647" />

You'll also need to remove the reference to this binding from your endpoint element.
 
Share this answer
 
Comments
Member 11151142 7-Jan-15 0:08am    
this option is not working in my case. Its required name element in binding...
Dominic Burford 7-Jan-15 0:31am    
The binding doesn't need to be named, in fact none of the elements require a name. Did you remove the reference to the name in your endpoint as I suggested? As long as there are no references to the name elsewhere in the config then it will work.
Member 11151142 7-Jan-15 4:03am    
Yes i have remove the name from endpoint section...and i have also remove the binding configuration where i had written bindingConfiguration="BasicHttpBinding_IService". But it still gives an error 413..
Member 11151142 7-Jan-15 4:17am    
The web.config file of service should have binding information that i have place in app web.config file??
Dominic Burford 7-Jan-15 8:04am    
Here is a copy of the web.config file where I resolved the same error. Use this to help you fix your problem.

<system.serviceModel>
<bindings>
<!--Need to set large values here so the WCF service can import large XML files-->
<basicHttpBinding>
<binding maxBufferSize="2147483647"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
openTimeout="00:30:00"
receiveTimeout="00:30:00"
closeTimeout="00:30:00"
sendTimeout="00:30:00">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="ClientService.ClientService">
<endpoint address="http://subversion.capita-dmd.local:88/BusinessTier.Services.ClientService.svc"
binding="basicHttpBinding" name="BasicHttpBinding_IClient" contract="ClientService.IClient" />
</service>
<service name="DebtorService.DebtorService">
<endpoint address="http://subversion.capita-dmd.local:88/BusinessTier.Services.DebtorService.svc"
binding="basicHttpBinding" name="BasicHttpBinding_IDebtor" contract="DebtorService.IDebtor" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior>
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900