0
我創建了兩個WCF Web服務。第一個服務是返回JSON字符串的get服務,第二個服務是接受此JSON字符串作爲Input的post服務並將這些數據存儲在數據庫中。發佈Web服務在本地正常工作,但不在服務器上
兩個工作在當地罰款,但是當我上傳我的代碼在服務器1服務繼續做工精細,但第2層服務,如郵政服務,該服務將返回一個錯誤:
Error 400 Bad Request.
按我的知識,我我在Web.config文件中丟失了一些東西。
<?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>
你''的服務的身份......會是它? –
Tim
2013-03-02 09:32:37
我試圖通過替換localhost與我的服務器IP地址too.I得到相同的錯誤。 – 2013-03-02 09:37:30