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.Schema.DatatypeImplementation' threw
an exception."}
Inner Exception Message:
"The type initializer for 'System.Xml.Schema.Datatype_long' threw an
exception."
Inner Inner Exception Message
{"Field token out of range."}
Stack Trace
at System.Xml.Schema.Compiler.Compile()
at System.Xml.Schema.XmlSchema.CompileSchemaInSet(Xml NameTable nameTable,
ValidationEventHandler eventHandler, XmlSchemaCompilationSettings
compilationSettings)
at System.Xml.Schema.Preprocessor.GetBuildInSchema()
at System.Xml.Schema.Preprocessor.Cleanup(XmlSchema schema)
at System.Xml.Schema.Preprocessor.Preprocess(XmlSchem a schema, String
targetNamespace, ArrayList imports)
at System.Xml.Schema.Preprocessor.Execute(XmlSchema schema, String
targetNamespace, Boolean loadExternals)
at System.Xml.Schema.XmlSchemaSet.PreprocessSchema(Xm lSchema& schema,
String targetNamespace)
at System.Xml.Schema.XmlSchemaSet.Add(String targetNamespace, XmlSchema
schema)
at System.Xml.Schema.XmlSchemaSet.Add(XmlSchema schema)
at System.Xml.Schema.XmlSchemaInference.CreateXmlSche ma(String targetNS)
at System.Xml.Schema.XmlSchemaInference.AddElement(St ring localName,
String prefix, String childURI, XmlSchema parentSchema,
XmlSchemaObjectCollection addLocation, Int32 positionWithinCollection)
at System.Xml.Schema.XmlSchemaInference.InferSchema1( XmlReader
instanceDocument, XmlSchemaSet schemas)
at System.Xml.Schema.XmlSchemaInference.InferSchema(X mlReader
instanceDocument)
at System.Data.DataSet.InferSchema(XmlDocument xdoc, String[]
excludedNamespaces, XmlReadMode mode)
at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXml(String fileName)
at ClassLibrary1.Class1.GetDataSet() in
C:\ajlopez\PruebasPuntoNet2\ClassLibrary1\Class1.v b:line 6
at _Default.Page_Load(Object sender, EventArgs e) in
C:\ajlopez\PruebasPuntoNet2\WebSite2\Default.aspx. vb:line 14
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
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/