By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,701 Members | 1,938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,701 IT Pros & Developers. It's quick & easy.

getting error at time of XmlSerialization

P: n/a
Hi Friends,

My work is stuck up because of this unresolvable and unbelievable
Error.

I'm trying to Serialize my Class object using XmlSerialization. And at
below line, I m getting "error File or assembly name xxxxxxx.dll, or
one of its dependencies, was not found.."

///I got error at this point
XmlSerializer xmlSerializer = new XmlSerializer(typeof(myObject));

Error: {"File or assembly name xxxxxxx.dll, or one of its dependencies,
was not found." }

As this is an IO error and I'm not using any external file. I am not
understand why this is happen with my code.

Thanks in advance.....waiting for your response.

Thanks & Regards,
Rushikesh
Integreon.

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
<IM***********@gmail.com> wrote in message news:11*********************@o13g2000cwo.googlegro ups.com...
I'm trying to Serialize my Class object using XmlSerialization. And at
below line, I m getting "error File or assembly name xxxxxxx.dll, or
one of its dependencies, was not found.."


Is this in an ASP.NET web application? Have you granted the ASP.NET
logon identity security privileges to create/write/read files from the TEMP
folder?

For background, that 'random' assembly name is an assembly that gets
dynamically code-generated in .NET 1.1 and earlier by the XML serializer
when it reflects against the Type of myObject. A common cause for getting
this error is you don't have access to read/write/create it (although this isn't
the only reason it may arise.)
Derek Harmon
Nov 12 '05 #2

P: n/a
Hi Derek,

No I'm not using ASP.NET, I'm creating a WinForm desktop application.
And I login as Administrator. So i don't think that permission of Temp
folder is responsible for this error. I already tried this, I tried to
create a file manually. This error came after making some change in My
Class, but I don't know how to resolve it.

Thanks & Regards,
Rushikesh
Integreon.

Derek Harmon wrote:
<IM***********@gmail.com> wrote in message news:11*********************@o13g2000cwo.googlegro ups.com...
I'm trying to Serialize my Class object using XmlSerialization. And at
below line, I m getting "error File or assembly name xxxxxxx.dll, or
one of its dependencies, was not found.."


Is this in an ASP.NET web application? Have you granted the ASP.NET
logon identity security privileges to create/write/read files from the TEMP
folder?

For background, that 'random' assembly name is an assembly that gets
dynamically code-generated in .NET 1.1 and earlier by the XML serializer
when it reflects against the Type of myObject. A common cause for getting
this error is you don't have access to read/write/create it (although this isn't
the only reason it may arise.)
Derek Harmon


Nov 12 '05 #3

P: n/a
<IM***********@gmail.com> wrote in message news:11*********************@g49g2000cwa.googlegro ups.com...
This error came after making some change in My Class, but I don't
know how to resolve it.


You may want to try the XmlSerializerPreCompiler described in an MSDN
article by Christophe Schittko on troubleshooting other causes of XmlSerializer
errors,

http://msdn.microsoft.com/library/en...trblshtxsd.asp

If the changes made to some XML serialization attributes on your class are
breaking the serializer, then the error messages from XSPC should help you
track down the culprit. You can download XSPC from Chris Sells' website,

http://www.sellsbrothers.com/tools/#...zerPreCompiler
Derek Harmon
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.