Framework1.1->Framework2.0 and 'There is an error in XML document'  
Author Message
e_LA





PostPosted: XML and the .NET Framework, Framework1.1->Framework2.0 and 'There is an error in XML document' Top

Hi

I am investigating some problem and I cannot find a solution. Maybe someone cen help me...

After converting project from Framework1.1->2.0 a have the following error in a few of my customers:

System.InvalidOperationException: There is an error in XML document <189,2>

-->System.FormatException: Input string was not in a correct format

...........

and after many exceptions

System.InvalidOperationException: <logAttributeSpec xmlns=''> was not expected.....

..a part of definiftion in cs

[XmlRoot("logAttributeSpec")]

public class LogAttributes

{

[XmlElement("structureList")]

public StructureList Structures;

[XmlElement("logTypeList")]

public LogTypeList LogTypes;

}

and deserializing...

XmlSerializer serializer = new XmlSerializer(typeof(LogAttributes));

and part of XML file

< xml version="1.0" encoding="utf-8" >
<logAttributeSpec>
......

The error did not exist before Framework conversion.

I did not do any changes in this part of software.

Another thing is that not all customers have this error - even with Framework 2.0 installed.

Any idea what can be wrong

Ela



.NET Development6  
 
 
Alexey Raga





PostPosted: XML and the .NET Framework, Framework1.1->Framework2.0 and 'There is an error in XML document' Top

Please show the values of your class peoperties

If there are "<" or ">" symbols or, especially, "&" symbol you can have this exception.



 
 
-Anton Lapounov





PostPosted: XML and the .NET Framework, Framework1.1->Framework2.0 and 'There is an error in XML document' Top

Could you paste here the full exception stack

Thanks,
Anton


 
 
e_LA





PostPosted: XML and the .NET Framework, Framework1.1->Framework2.0 and 'There is an error in XML document' Top

Hi,

My client uninstalled my app ran EasyCleaner in order to clean registry and after that installed my application again and it works.....

It means that something is left in registry which cause the error during reading XML files.

What can I do in order to avoid such error in the future

E.


 
 
Sergey Dubinets - MSFT





PostPosted: XML and the .NET Framework, Framework1.1->Framework2.0 and 'There is an error in XML document' Top

With information you gave it's hard to say what's went wrong on your machine.

If you would see this problem again plese give us XML file, Exception with the stack and repro if posible.



 
 
e_LA





PostPosted: XML and the .NET Framework, Framework1.1->Framework2.0 and 'There is an error in XML document' Top

I would like to however there is some confident data in this XML and I cannot copy this exception because I just received it as a screenshot from my customer.
In my opinion there is an issue in installer and for sure I will investigate the problem in the future.

Ela

 
 
shobha Kumsi





PostPosted: XML and the .NET Framework, Framework1.1->Framework2.0 and 'There is an error in XML document' Top

hi,

I have installed .net framework 2.0 . Before i was using framwork 1.1.

My problem is i am not able to use System.net.ftpwebrequest. After installing framework 2.0.

Still my application( VB.net window application ) is using framework 1.1.

Any help can be appreciated.........

Shobha



 
 
e_LA





PostPosted: XML and the .NET Framework, Framework1.1->Framework2.0 and 'There is an error in XML document' Top

Shobha,

Please create a new thread. It is another subject.

Ela