Hi people!
I'm running a Visual Studio 2005, Professional, on Windows XP Professional.
I've found a little big problem, reading a DataSet. If I try:
ds.ReadXml("c:\ data.xml")
it raises the exception ONLY in Web Sites:
{"The type initializer for 'System.Xml.Sch ema.DatatypeImp lementation' threw
an exception."}
Inner Exception Message:
"The type initializer for 'System.Xml.Sch ema.Datatype_lo ng' threw an
exception."
Inner Inner Exception Message
{"Field token out of range."}
Stack Trace
at System.Xml.Sche ma.Compiler.Com pile()
at System.Xml.Sche ma.XmlSchema.Co mpileSchemaInSe t(XmlNameTable nameTable,
ValidationEvent Handler eventHandler, XmlSchemaCompil ationSettings
compilationSett ings)
at System.Xml.Sche ma.Preprocessor .GetBuildInSche ma()
at System.Xml.Sche ma.Preprocessor .Cleanup(XmlSch ema schema)
at System.Xml.Sche ma.Preprocessor .Preprocess(Xml Schema schema, String
targetNamespace , ArrayList imports)
at System.Xml.Sche ma.Preprocessor .Execute(XmlSch ema schema, String
targetNamespace , Boolean loadExternals)
at System.Xml.Sche ma.XmlSchemaSet .PreprocessSche ma(XmlSchema& schema,
String targetNamespace )
at System.Xml.Sche ma.XmlSchemaSet .Add(String targetNamespace , XmlSchema
schema)
at System.Xml.Sche ma.XmlSchemaSet .Add(XmlSchema schema)
at System.Xml.Sche ma.XmlSchemaInf erence.CreateXm lSchema(String targetNS)
at System.Xml.Sche ma.XmlSchemaInf erence.AddEleme nt(String localName,
String prefix, String childURI, XmlSchema parentSchema,
XmlSchemaObject Collection addLocation, Int32 positionWithinC ollection)
at System.Xml.Sche ma.XmlSchemaInf erence.InferSch ema1(XmlReader
instanceDocumen t, XmlSchemaSet schemas)
at System.Xml.Sche ma.XmlSchemaInf erence.InferSch ema(XmlReader
instanceDocumen t)
at System.Data.Dat aSet.InferSchem a(XmlDocument xdoc, String[]
excludedNamespa ces, XmlReadMode mode)
at System.Data.Dat aSet.ReadXml(Xm lReader reader, Boolean denyResolving)
at System.Data.Dat aSet.ReadXml(St ring fileName)
at ClassLibrary1.C lass1.GetDataSe t() in
C:\ajlopez\Prue basPuntoNet2\Cl assLibrary1\Cla ss1.vb:line 6
at _Default.Page_L oad(Object sender, EventArgs e) in
C:\ajlopez\Prue basPuntoNet2\We bSite2\Default. aspx.vb:line 14
at System.Web.UI.C ontrol.OnLoad(E ventArgs e)
at System.Web.UI.C ontrol.LoadRecu rsive()
at System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
In console applications, the same instruction, with the same data, runs OK.
The same application, runs from VS ok, in other machines, and in my Virtual
Machines.
Why? Any clue?
TIA
Angel "Java" Lopez
http://www.ajlopez.com/