![](/img/trans.png)
[英]PathTooLongException when publishing MVC 4 app. The specified path, file name, or both are too long
[英]X509Certificate2 Import PathTooLongException: The specified path, file name, or both are too long
我正在尝试从 base64string 导入 X509Certificate2 并收到异常“指定的路径、文件名或两者都太长。完全限定的文件名必须少于 260 个字符,目录名必须少于 248 个字符” . 您能否帮助了解此异常的含义。
var pfx = certficatestring;
var bytes = Encoding.UTF32.GetBytes(pfx);
var certdata = Convert.ToBase64String(bytes);
X509Certificate2 x509 = new X509Certificate2();
x509.Import(certdata,password,X509KeyStorageFlags.Exportable);
return x509;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.