惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - Vincent

reCaptcha 在UpdatePanel 和 ModalPopup中的使用 - Vincent System.ArgumentOutOfRangeException at System.Web.HttpCachePolicy.UtcSetLastModified (DateTime utcDate) Fabulous Adventures In Coding Microsoft will end OEM and shrink-wrapped sales of Windows XP on June 30, 2008 - Vincent My AutoCompleteExtender Windows Live Writer GRI-MindHarbor软件公司 单表继承 (Single Table Inheritance) 写给yzx110的一个实例,仅作参考! 很久没有写blog了. Base64 MD5加密 信用卡是超前消费的一种手段 vs.net2003无法打开*.xsd文件的解决方法 针对MS Project 2003 的开发 Test Your Knowledge of Microsoft Visual Studio .NET - Vincent page event Microsoft Office InfoPath 2003 Toolkit for Visual Studio .NET 在Code-Behind中操作WebUserControl - Vincent
Invalid character in a Base-64 string
Vincent · 2009-11-09 · via 博客园 - Vincent

最近收到所维护网站的错误提示邮件.内容大致如下:

type=System.FormatException

message=Invalid character in a Base-64 string.

stack=

at System.Convert.FromBase64CharArray(Char[] inArray, Int32 offset, Int32 length)

at System.Web.HttpServerUtility.UrlTokenDecode(String input)

at System.Web.UI.Page.DecryptString(String s)

如果ViewState中的数据量过大,某些代理和防火墙将阻止对包含这些数据的页的访问。由于最大数量会随所采用的防火墙和代理的不同而不同,较大的ViewState可能会出现偶发性问题。如果您需要存储大量的数据项,可以打开ViewState分块,这样会自动将数据分割到多个ViewState分块中。

例如有这样一段ViewState:

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUKLTk2Njk3OTQxNg9kFgICAw9kFgICCQ88KwANAGQYAQUJR3Jp
ZFZpZXcxD2dk4sjERFfnDXV/hMFGAL10HQUnZbk="
/>

我们在web.config中做如下设置:

<pages maxPageStateFieldLength="40">

此后的ViewState内容就变成了如下:

<input type="hidden" name="__VIEWSTATEFIELDCOUNT" id="__VIEWSTATEFIELDCOUNT"
value="3" />
<input type="hidden" name="__VIEWSTATE"
id="__VIEWSTATE" value="/wEPDwUKLTk2Njk3OTQxNg9kFgICAw9kFgICCQ88" />
<input type="hidden" name="__VIEWSTATE1"
id="__VIEWSTATE1" value="KwANAGQYAQUJR3JpZFZpZXcxD2dk4sjERFfnDXV/" />
<input type="hidden" name="__VIEWSTATE2"
id="__VIEWSTATE2" value="hMFGAL10HQUnZbk=" />