Im receiving the following error in my WCF program when I send too many xml files:
System.ServiceModel.ProtocolException: The remote server returned an unexpected response: (413) Request Entity Too Large. ---> System.Net.WebException: The remote server returned an error: (413) Request Entity Too Large.
All the other stack overflow answers don't seem to offer me a solution as they mention binding elements in the app.config and my app.config uses services so I'm unsure where to stick the changes. This also makes me wonder if I'm also writing my config file wrong for a production service.
app.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service name="ConfigService.UserService">
<endpoint address="" binding="basicHttpBinding" contract="ConfigService.IUserService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/ProductionProgrammerWebService/UserService/" />
</baseAddresses>
<timeouts openTimeout="00:00:30" />
</host>
</service>
<service name="ConfigService.ConfigurationService">
<endpoint address="" binding="basicHttpBinding" contract="ConfigService.IConfigurationService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/ProductionProgrammerWebService/ConfigurationService/" />
</baseAddresses>
<timeouts openTimeout="00:00:30" />
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>