472,143 Members | 1,601 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

getting error at time of XmlSerialization

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
3 1871
<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
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
<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.

Similar topics

2 posts views Thread by STom | last post: by
2 posts views Thread by pb | last post: by
reply views Thread by IMS.Rushikesh | last post: by
reply views Thread by Matthew Copeland | last post: by
5 posts views Thread by igotyourdotnet | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.