title: The specified path, file name, or both are too long
body: <p>I am trying to read a long characters string using byte[] variable but it is giving me the following error:</p>
  
  <p>{System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.</p>
  
  <p>Can anyone please help, thanks.</p>
  
  <p>Please view the following code below. At second line I am getting the above error.</p>
  
  <pre><code>string filename = "Ak8AdFf/gICvXL9Ls3fDVMlLk7WbnddtL6GsobiBzXVLs4SurY6vhsOuMIRduX+PYmY1TYRmh026PbZlw0TNU711pLXGdc1qNqusr7if2WreciqKMJixqceH5WgrcTR2O5NAuXa/l8apkcSd3VQ/dVm3YJ7HxNSp1LvXi+CFWoR5nlNpeIffueCo6Kl1b4JxgGWSeqiBj1qbSKVQs0KoU7tDxUetbDodIai69vd8jSAIIKCEKvXL6BBBBBBBBBBBBBBBBBBBAAAAAAAAAAAAAACCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==";
  byte[] bmpbyteArray = System.IO.File.ReadAllBytes(filename);
  </code></pre>