Skip to content

System.PlatformNotSupportedException when using ContentDisposition  #42576

@pureggerstefan

Description

@pureggerstefan

Greetings,

since the .NET5 RC1 update on a Blazor WASM, following lines lead to a System.PlatformNotSupportedException

 private static string GetFilename(IReadOnlyDictionary<string, IEnumerable<string>> headers)
        {
            if (headers.ContainsKey("Content-Disposition"))
            {
                //Exception throws at:
                var contentDisposition = new ContentDisposition(headers["Content-Disposition"].First());

                return contentDisposition.FileName;
            }

            return string.Empty;
        }

I think this is a bug, since the ContentDisposition class documentation says it applies to .NET RC1.

Best regards,
Stefan

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions