For Programmers: Free Programming Magazines  


Home > Archive > C# .NET > April 2004 > Re: XmlSerializer problem (bug,virus??)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: XmlSerializer problem (bug,virus??)
Michael Voss

2004-04-06, 9:49 am

Hi there !

"Chris Jackson" wrote:

> Can you tell us the circumstances under which this code is running? XML
> Serialization dynamically builds and compiles an assembly to handle the
> serialization. (By default, it's in c:\windows\temp) That is why you are
> seeing the weird file names - that is the dll for the dynamically

generated
> assembly that handles the serialization. If this file is inaccessible to

the
> process from which it is running (the ACLs may not be set for the process
> identity that you intend to use) then you will see this error.

[snip]

The same problem occurs in my project; funny enough, I am using two
XmlSerializers in two different classes. One of them works just fine, the
error pops up on the other one only, although the code used to set them up
is (almost) identical. The only difference is the type I am going to
(de-)serialize:

// Works fine
XmlSerializer ser1 = new XmlSerializer(typeof(FirstClass));

// Throws an Error
XmlSerializer ser2 = new XmlSerializer(typeof(SecondClass));

Any hints ?


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com