我使用C#將數據發佈到IIS Web服務器中。如何增加Http Post中的項目大小
我已經使用了XML和模式,並且在一個字段中發佈非常長的數據時出現'錯誤的請求錯誤'。 例如,
<Field1>TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT.......<Field1>
我已經修改我的web.config
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" maxReceivedMessageSize="21474836" maxBufferSize="21474836" maxBufferPoolSize="21474836" ></standardEndpoint>
</webHttpEndpoint>
些什麼,我需要做的,使這項工作?
<system.web>
<authentication mode="Forms" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<httpRuntime maxRequestLength="204800" executionTimeout="12000" requestValidationMode="2.0" requestPathInvalidCharacters="" />
</system.web>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"></serviceHostingEnvironment>
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" maxReceivedMessageSize="21474836" maxBufferSize="21474836" maxBufferPoolSize="21474836"></standardEndpoint>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
如果您使用的JavaScript後回來,然後確保你的web.config設置爲接受大JSON斑點固定它。 [該JSON請求太大,無法反序列化](http://stackoverflow.com/questions/10966328/the-json-request-was-too-large-to-be-deserialized) – Romoku 2013-05-08 19:16:11
我正在使用C#客戶端和XML – DafaDil 2013-05-08 19:17:08
請求正文有多大,請使用Fiddler輕鬆獲取該數字。 – EricLaw 2013-05-08 23:01:05