C # solution appears base-64 character array of length invalid C # solution appears base-64 character array of invalid length

 

A recent project, when passing parameters, normal, throwing "Invalid length of the base-64 character array" error in Win7 under the Win2003

Contrast a bit after Convert.ToBase64String () converted parameters found, + have become spaces

So before passing parameters, use the Replace ( "+", "% 2B"), the destination page using Replace ( "% 2B", "+"), so a replacement, the problem is solved

 

A recent project, when passing parameters, normal, throwing "Invalid length of the base-64 character array" error in Win7 under the Win2003

Contrast a bit after Convert.ToBase64String () converted parameters found, + have become spaces

So before passing parameters, use the Replace ( "+", "% 2B"), the destination page using Replace ( "% 2B", "+"), so a replacement, the problem is solved

Guess you like

Origin www.cnblogs.com/Alex80/p/11596426.html