"Filename or extension too long" in System.Private.CoreLib.dll

178 views Asked by At

I'm trying to create a StorageFile object from a URL, passing in a URI object with URL and opening a stream to it

StorageFile.CreateStreamedFileFromUriAsync(Guid.NewGuid().ToString(), uri, RandomAccessStreamReference.CreateFromUri(uri))

This triggers a "File name or extension too long" exception, with the filename (url) in question being 283 character long

I tried looking up RandomAccessStreamReference.CreateFromUri(Uri) Method and StorageFile.CreateStreamedFileFromUriAsync(String, Uri, IRandomAccessStreamReference) Method in MSDocs but none list any exception about it.

For reference, this is a Universal Windows Platform program, with Target 1903, min 1809

0

There are 0 answers