-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File URI cannot be parsed with @ sign #24002
Comments
Does this work .NET Framework? |
No. This fails to parse on both .NET Framework and .NET Core. |
Here's a repro: using System;
namespace ConsoleApp6
{
class Program
{
static void Main(string[] args)
{
try
{
var result = new Uri(@"file:///\\contoso.com@SSL\user\content\path\projects\blank.xlsx", UriKind.Absolute);
}
catch (Exception e)
{
Console.WriteLine(e);
}
}
}
} And the error:
|
Can you point to the relevant RFC for URI's that describe this "legacy" format? Since both .NET Framework and .NET Core don't support this format, we need to understand more about it. Most of the URI RFC's we support are in RFC 3986, 3987 (IRIs). |
That looks more like a UNC path naively prefixed with "file:///" than any sort of valid URI. Maybe OpenXML should do its own parsing if it need to support that? |
@poizan42 may be right. Looks like this is a WebDAV path expressed as a UNC path (see https://en.wikipedia.org/wiki/Path_(computing)) with |
Since this seems to be a non-standard way of forming a URI, I'll close this for now. Thanks for the help! |
The DocumentFormat.OpenXml library uses System.IO.Packaging to open office related documents. A user posted an issue where one of the package relationships uses a legacy URI format that fails to be parsed. This document opens fine in PowerPoint and would like to be able to open it with the .NET library. The URI in question has the form:
The text was updated successfully, but these errors were encountered: