I have a WCF that is used by a Delphi application. Sometimes I get this error when sending a large request to the server:
I configured web.config on the server side as shown below:
Web.config
<?xml version="1.0" ?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="basicHttpBinding"> <readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> </binding> </basicHttpBinding> </bindings> <services> <service name="NewServiceType"> <clear /> <endpoint address="http://localhost" binding="basicHttpBinding" bindingConfiguration="" contract="IRoboConsultaLog" /> </service> </services> <behaviors> <serviceBehaviors> <behavior> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>
But I get this error all the time. Some people on the Internet suggest that client.app.config should also be changed, but I don’t know how to do this, since I use Delphi.
I also noticed that I have no idea how to set up the <endpoint> tag correctly, and maybe this is the cause of all my problems. Bellow is both an interface and a class of my web service (reduced to be more understandable):
Interface:
namespace RoboConsultaLogServer { [ServiceContract] public interface IRoboConsultaLog { [OperationContract] void Log(string key, string numeroSerial, string nomeTarefa, int qtdProcessos, float uptime, float duracaoTarefa, int qtdSucesso, int qtdInsucesso, int qtdCancelado, bool servico, bool notificarResponsaveis, string logProcessos); } }
Class
public class RoboConsultaLog : IRoboConsultaLog { ... }
Does anyone know how to fix this?
source share