Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Wed, 19 Sep 2007 14:12:08 +0530,    group: microsoft.public.dotnet.academic        back       


The error message is : There was an error generating the XML document.   
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(ThirdPartyFlatFileDetailCollection));

try

{

isinXML.Serialize(newXMLDoc, coll);

}

catch (Exception ex)

{

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

if (rethrow)

{

throw;

}

Thanks

Sandy
date: Wed, 19 Sep 2007 14:12:08 +0530   author:   Sandeep Singh

Re: The error message is : There was an error generating the XML document.   
"Sandeep Singh"  wrote in message 
news:%23Sul5jp%23HHA.3900@TK2MSFTNGP02.phx.gbl...
> 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(ThirdPartyFlatFileDetailCollection));
>
> 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.
date: Wed, 19 Sep 2007 06:33:36 -0500   author:   PvdG42

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us