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 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
I am getting the same error. Did you ever figure out what was causing this? Any help would be greatly appreciated.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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;
}
|
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()
|
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.
|
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...
|
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:
| |
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);
}
|
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>
...
|
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));
|
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
|
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...
|
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,...
| |
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |