HighTechTalks DotNet Forums  

The error message is : There was an error generating the XML document.

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss The error message is : There was an error generating the XML document. in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Sandeep Singh
 
Posts: n/a

Default The error message is : There was an error generating the XML document. - 09-19-2007 , 04:42 AM






Hi All,

I am getting an error while generating XML .
The error message is : There was an error generating the XML document.
Unable to cast object of type '.ThirdPartyFlatFileDetailCollection' to type
'ThirdPartyFlatFileDetailCollection'.

Please Note that it was working fine for last many months but today it
becomes giving error.

So please response me on the same group.

Codes are :

string str = filePath;
StreamWriter newXMLDoc = new StreamWriter(str);

XmlSerializer isinXML = new
XmlSerializer(typeof(ThirdPartyFlatFileDetailColle ction));

try

{

isinXML.Serialize(newXMLDoc, coll);

}

catch (Exception ex)

{

bool rethrow = ExceptionPolicy.HandleException(ex,
Common.POLICY_LOGANDTHROW);

if (rethrow)

{

throw;

}

Thanks

Sandy






Reply With Quote
  #2  
Old   
PvdG42
 
Posts: n/a

Default Re: The error message is : There was an error generating the XML document. - 09-19-2007 , 07:33 AM






"Sandeep Singh" <sandeepmaharana (AT) yahoo (DOT) com> wrote

Quote:
Hi All,

I am getting an error while generating XML .
The error message is : There was an error generating the XML document.
Unable to cast object of type '.ThirdPartyFlatFileDetailCollection' to
type
'ThirdPartyFlatFileDetailCollection'.

Please Note that it was working fine for last many months but today it
becomes giving error.

So please response me on the same group.

Codes are :

string str = filePath;
StreamWriter newXMLDoc = new StreamWriter(str);

XmlSerializer isinXML = new
XmlSerializer(typeof(ThirdPartyFlatFileDetailColle ction));

try

{

isinXML.Serialize(newXMLDoc, coll);

}

catch (Exception ex)

{

bool rethrow = ExceptionPolicy.HandleException(ex,
Common.POLICY_LOGANDTHROW);

if (rethrow)

{

throw;

}

Thanks

Sandy


Try this:
In your solution folder, delete the debugger database (.ncb, I think) file
and the debug folder. In the project folder, delete the debug folder. Reload
the solution into VS then build.
That may clear the issue.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.