<system.webServer>
...
<security>
<requestFiltering>
<!--1073741824 ==> 1GB-->
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
...
</system.webServer>
#region Configure for Content Provider =>區塊說明,在程式裡不會work
//Settings for Cotent Provider (for Alpha Enviroment)
string szCID = xmlDoc.DocumentElement["CID"].InnerText;
string szKey = "z1okwCmRSkgk/vkWzxIuwQNuUvf9d8gj";
string szIV = "dg454KArm6g=";
string szPassword = "1234";
#endregion
A potentially dangerous Request.Form value was detected from the client (ContentBody_txtContent="<style type="text/cs...").
.aspx新增了<%@ Page validateRequest="false"%>
最後找到還需要在web.config裡面新增<httpRuntime requestValidationMode="2.0" />
相關專案: SINGTEX
[InvalidOperationException: 由於該物件目前的狀態,導致作業無效。]
System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() +2692302
System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) +61
System.Web.HttpRequest.FillInFormCollection() +148
[HttpException (0x80004005): URL 編碼型式資料無效。]
System.Web.HttpRequest.FillInFormCollection() +206
System.Web.HttpRequest.get_Form() +68
System.Web.HttpRequest.get_HasForm() +8735447
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
System.Web.UI.Page.DeterminePostBackMode() +63
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +133
若你的 Web 應用程式真的會傳遞超過 1,000 個欄位時,這個預設值也是可以設定的,請修改網站根目錄下的 web.config 檔,並在
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="2500" />
</appSettings>