“Invalid Character in Base-64 String” using ASP.NET and C#

匆匆过客 提交于 2019-11-29 11:55:05

Just ran into this. Remove the form tag from the page you are loading via jquery.

Had the same problem, the reason why I got the error was because I sent a complete form as string into a javascript method, which then posted the form.

That was a bit heavy, and my fix was to send only the form data as serialized json, and then create and post the form through javascript, like in this post.

http://weblogs.asp.net/hajan/archive/2011/03/16/posting-from-asp-net-webforms-page-to-another-url.aspx

invalid view state don't have any value for your logger or for users or for your website to avoid this error try to add the following In Global.ascx:

void Application_Error(object sender, EventArgs e)
    {          
                if (ex is HttpException && ex.InnerException is ViewStateException)
                {
                    Response.Redirect(Request.Url.AbsoluteUri);
                    return;
                }
    }

for more info check the following link:

https://www.karpach.com/viewstateexception-invalid-viewstate.htm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!