我收到这个错误
ReadTimeout = '((System.IO.Stream)(ms)).ReadTimeout' threw an exception of type 'System.InvalidOperationException'.
Run Code Online (Sandbox Code Playgroud)
我的代码是。
byte[] imageBytes = Convert.FromBase64String(img);
MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length); //Problem generates here//
Run Code Online (Sandbox Code Playgroud)
谢谢..
仅当流支持超时时,您才能使用ReadTimeout / WriteTimeout属性。您可以通过CanTimeout属性进行检查。如果 CanTimeout 属性返回 false,则对这些属性的所有访问都应引发 InvalidOperationException。