Bug 11726 - XMLReader.Create(Stream, XmlReaderSettings, string) fails when using invalid (no) URI
Summary: XMLReader.Create(Stream, XmlReaderSettings, string) fails when using invalid ...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.XML ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-04-11 06:09 UTC by dresel
Modified: 2013-08-08 04:57 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description dresel 2013-04-11 06:09:11 UTC
Hi,

I'm once again trying to setup Mono Entity Framework with MSSQL 2008.

SqlProviderManifest (System.Data.Entity.SqlServer) calls XmlReader.Create(Stream, XmlReaderSettings, string) with "System.Data.Resources.SqlClient.SqlProviderServices.ProviderManifest.xml" as third parameter which leads to an "Invalid URI" exception.

I don't know if this is a miss behaviour of XmlReader.Create or a wrong call by SqlProviderManifest. It should however work if you just leave out the third parameter as described here (http://karimlalani.blogspot.co.at/2013/01/day-2-porting-nopcommerce-to-linux.html).
Comment 1 Atsushi Eno 2013-08-07 12:14:40 UTC
This just worked without problem. Maybe you have something else wrong.

using System;
using System.IO;
using System.Text;
using System.Xml;

public class Test
{
	public static void Main ()
	{
		var ms = new MemoryStream (Encoding.UTF8.GetBytes ("<xml/>"));
		var xr = XmlReader.Create (ms, new XmlReaderSettings (), "System.Data.Resources.SqlClient.SqlProviderServices.ProviderManifest.xml");
		while (!xr.EOF)
			xr.Read ();
	}
}
Comment 2 dresel 2013-08-08 04:57:58 UTC
SqlProviderManifest.cs (https://github.com/mono/entityframework/blob/master/src/EntityFramework.SqlServer/SqlProviderManifest.cs) calls the function via
XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName), null, resourceName) which leads to this exception.