What is the difference between Convert.ToBase64String(byte[]) and HttpServerUtility.UrlTokenEncode(byte[])?
问题 I'm trying to remove a dependence on System.Web.dll from a Web API project, but have stumbled on a call to HttpServerUtility.UrlTokenEncode(byte[] input) (and its corresponding decode method) that I don't know what to replace with to ensure backwards compatibility. The documentation says that this method Encodes a byte array into its equivalent string representation using base 64 digits, which is usable for transmission on the URL. I tried substituting with Convert.ToBase64String(byte[] input