当我进行回发时,我收到此错误:由于对象的当前状态,操作无效。
这是堆栈跟踪:
[InvalidOperationException: Operation is not valid due to the current state of the object.]
System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) +11470463
System.Web.HttpRequest.FillInFormCollection() +329
[HttpException (0x80004005): The URL-encoded form data is not valid.]
System.Web.HttpRequest.FillInFormCollection() +11584898
System.Web.HttpRequest.get_Form() +157
System.Web.HttpRequest.get_HasForm() +11585700
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +141
System.Web.UI.Page.DeterminePostBackMode() +100
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +259
我尝试添加web.config的appSettings:
<add key="aspnet:MaxHttpCollectionKeys" value="2001" />
但是,它没有解决问题......
奇怪的是,只有当我的网站在IIS上生产时我才会收到错误(我在使用ASP.NET开发服务器进行调试时没有收到错误)。
最近我们在IIS的网站上添加了一个ssl证书,证书是否可能导致问题?