473,805 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unknown error in XmlSerializer

Hi,

when calling the XmlSerializer constructor, I get the following error:

Top Level Exception
Type: System.IO.IOExc eption
Message: Unknown Error (-1).
Source: mscorlib
Stack Trace: at System.IO.__Err or.WinIOError(I nt32 errorCode, String
str)
at System.IO.FileS tream..ctor(Str ing path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync, String
msgPath, Boolean bFromProxy)
at System.IO.FileS tream..ctor(Str ing path, FileMode mode, FileAccess
access, FileShare share)
at
System.CodeDom. Compiler.CodeCo mpiler.FromSour ceBatch(Compile rParameters
options, String[] sources)
at System.CodeDom. Compiler.CodeCo mpiler.FromSour ce(CompilerPara meters
options, String source)
at
System.CodeDom. Compiler.CodeCo mpiler.System.C odeDom.Compiler .ICodeCompil
er.CompileAssem blyFromSource(C ompilerParamete rs options, String source)
at System.Xml.Seri alization.Compi ler.Compile()
at System.Xml.Seri alization.TempA ssembly..ctor(X mlMapping[]
xmlMappings)
at System.Xml.Seri alization.XmlSe rializer..ctor( Type type, String
defaultNamespac e)
at System.Xml.Seri alization.XmlSe rializer..ctor( Type type)
at ...

Any ideas?

Thanks,
Brecht
Jan 30 '06 #1
2 1930
Brecht Yperman wrote:
Hi,

when calling the XmlSerializer constructor, I get the following error:

Top Level Exception
Type: System.IO.IOExc eption
Message: Unknown Error (-1).
Source: mscorlib
Stack Trace: at System.IO.__Err or.WinIOError(I nt32 errorCode, String
str)


Apparently it's got nothing to do with the XmlSerializer. Every IO call
seems to throw this exception.

Brecht
Jan 31 '06 #2
timeee
1 New Member
I am getting the same error. Did you ever figure out what was causing this? Any help would be greatly appreciated.
May 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2662
by: Michel | last post by:
Hi there, What is the best way to serialize unknown data? I have a class that contains a list of parameter objects. The parameter has a value which can be a simple value of a complex class, e.g. class param { object value; }
0
9725
by: Riley Phelps | last post by:
When I use the XML Serializer in the following example, the first Serialize (with the class Pets) works, but the second (with the cplaa Pets2) fails. Which arrtubute nedds to be applied to make the second Serialize work namespace SerializeTes public class Class args Test _test = new Test() _test.TestAnimal()
2
14971
by: Richard | last post by:
I've used XMLSerializer before to store user settings with great success, but this is the first time I've tried to serialize an Array. It serializes fine, but when I try to deserialize it, I get the following error: There is an error in XML document (0, 0). ---> System.Xml.XmlException: The data at the root level is invalid. Line 1, position 1. As I've done this before, I'm at a loss to explain it.
0
1586
by: Dan Noel | last post by:
I am implementing a DataStore/Settings object that stores objects in XML by serializing the objects in XML and then associating these objects with key names. At some later point, I want to retrieve the object associated with a given keyname, but I am running into trouble deserializing objects into the correct object type. Nearly all of the examples that I have found that use XmlSerializer pass in a type ahead of time, but in my case...
4
1993
by: Steve Long | last post by:
Hello, I hope this is the right group to post this to. I'm trying to serialize a class I've written and I'd like to be able to serialze to both binary and xml formats. Binary serialization is working fine but when I try to instantiate an XmlSerializer object with: Dim xmls As New XmlSerializer(GetType(CLayerDefinition)) I get the following error:
3
9444
by: Raed Sawalha | last post by:
Hello when I serialize an object an error generated using this function public string SerializeObject(object oClassObject,System.Type oClassType) { XmlSerializer oSerializer = new XmlSerializer(oClassType); System.Text.StringBuilder strBuilder = new System.Text.StringBuilder(); System.IO.TextWriter writer = new System.IO.StringWriter(strBuilder); try { oSerializer.Serialize(writer,oClassObject); }
0
1154
by: yuriy_zubarev | last post by:
Greetings, I'm using XmlSerializer to read XML file into an object. XML file can have the following contents: .... <properties xsi:type="MyType"> <file-path>../../work</file-path> </properties> ...
4
3661
by: ink | last post by:
Hi All I am relatively new to doing this and i think that i am making some king of school boy error. The error i am getting is on the following line of code. XmlSerializer xs = new XmlSerializer(typeof(ImportRecord));
7
2598
by: svpriyan | last post by:
Dear Buddies, I have two Java Prog: My task is to read the Content of the file and write to an XML file. so i started doing it perfectly... What i have problem is when i tried to execute the main class, i am not able to reach the book class yet. it says like this My error comes under loadData() method. cannot find symbol
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10607
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10104
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5541
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.