0

更新,问题是:我可以在它到达 Global.asax 之前阻止 -1' 的表单字符串值吗?

因此,我们在 Global.asax 中相当一致地得到这些错误。这是一种基于表单的 bot hack 尝试,它试图传递无效的表单值。保持不变的一件事是表单值之一是“-1”。如果我能阻止它,那我就没事了。但是,我无法在页面上阻止它,因为 Global.asax 首先收到错误并导致页面错误。如何检查此字符串并停止处理?

Error Message: System.FormatException: Invalid length for a Base-64 char array. at System.Convert.FromBase64String(String s) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) at System.Web.UI.HiddenFieldPageStatePersister.Load()

Form Values: 
advsearch:1
keywords:
ctl00$footer1$ddlcurrency:1
ctl00$cpmaincontent$ddlcategory:170
ctl00$cpmaincontent$ddlsubcategory:0
ctl00$cpmaincontent$ddlsortby:0
ctl00$ucfooter$ddlcurrency:1
__viewstate:/...
__eventvalidation:/...
ctl00$footer1$sitepath:1
ctl00$ucheader$hdnsplitedval:1
ctl00$ucheader$txtsearch:1
ctl00$ucheader$btnsearch:search
ctl00$cpmaincontent$txtkeyword:1
ctl00$cpmaincontent$btnsearch:1
ctl00$cpmaincontent$uccolleft$hfcatname:1
ctl00$cpmaincontent$uccolleft$hfsubcatname:0
ctl00$ucfooter$sitepath:-1'<--------
4

0 回答 0