I created two WCF web services. The 1st service is a get service returning JSON string and the 2nd service is a post service accepting this JSON string as an Input and storing those data in database.
Both the service working fine on Local but when I upload my code on the server 2nd service, i.e post service, returns an error: Error 400 Bad Request.
I think I am missing somthing in my web.config file. I am adding my web.conging here :
<?xml version="1.0"?> <configuration> <connectionStrings> <!-- <add name="Conn" connectionString="Data Source=*.*.*.*;Initial Catalog=*;User ID=*;Password=*" providerName="System.Data.SqlClient" /> <add name="connString" connectionString="Data Source=*.*.*.*;Initial Catalog=*;User ID=*;Password=*" providerName="System.Data.SqlClient" /> --> <add name="Conn" connectionString="Data Source=*;Initial Catalog=SunshineDB;Integrated Security=True"/> </connectionStrings> <system.serviceModel> <bindings> <webHttpBinding> <binding name="NetTcpBinding_IClaims" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transferMode="Buffered" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="16384"/> <security mode="None"> <transport clientCredentialType="None" /> </security> </binding> </webHttpBinding> <wsHttpBinding> <binding name="wsBufferedHttpsBinding" messageEncoding="Mtom" maxReceivedMessageSize="11534336" maxBufferPoolSize="524288" sendTimeout="00:05:00" receiveTimeout="00:05:00" openTimeout="00:05:00" closeTimeout="00:05:00" > <readerQuotas maxDepth="64" maxStringContentLength="11534336" maxArrayLength="11534336" maxBytesPerRead="11534336" maxNameTableCharCount="16384" /> </binding> </wsHttpBinding> <customBinding> <binding name="basicConfig"> <binaryMessageEncoding/> <httpTransport transferMode="Streamed" maxReceivedMessageSize="67108864"/> </binding> </customBinding> </bindings> <services> <service name="SunShineServices.Service1"> <endpoint address="" binding="webHttpBinding" behaviorConfiguration="EndBehave" contract="SunShineServices.ISunShineServices"> <identity> <dns value="localhost" /> </identity> </endpoint> </service> </services> <behaviors> <endpointBehaviors> <behavior name="EndBehave"> <webHttp/> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>
Attachment: m-audit.zip