473,718 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Serialization problem related to framework versions

Hi all

I get an exception when trying to deserialize a simple configuration file
using XML Serialization. The very long stacktrace can be seen at the bottom
of this message. I've see other messages related a similar error but none
of the solutions suggested are valid in case :/

I have tracked the problem down to the compilation of the temporary DLL that
handles the actual serialization. The following commandline (that is one
single line) is executed by the framework when trying to deserialize my configuration:

"c:\windows\mic rosoft.net\fram ework\v1.1.4322 \csc.exe" /t:library /utf8output
/R:"c:\windows\a ssembly\gac\sys tem.xml\1.0.500 0.0__b77a5c5619 34e089\system.x ml.dll"

/R:"c:\program files\MyApp\MyC onfig.dll" /R:"c:\windows\m icrosoft.net\fr amework\v1.1.43 22\mscorlib.dll "
/out:"C:\DOCUME~ 1\User\LOCALS~1 \Temp\i2_6axn4. dll" /debug- /optimize+ /w:1
"C:\DOCUME~1\Us er\LOCALS~1\Tem p\i2_6axn4.0.cs "

Note that it uses the .NET 1.1 compiler and core lib but references the .NET
1.0 XML assembly. The result is that the assembly isn't created and hence
cannot be loaded.

I've specifeid the required runtime version in the .config file to be .NET
1.1 without any improvements.

The problems occur on a Windows XP test machine with both .NET 1.0 and 1.1.
The application is built using VS.NET 2003 on a machine with only .NET 1.1.
The user running the code on the test machine has administrative rights.

I've have tried the XmlSerializatio n precompiler and it works without problems...

Anyone have any ideas why this happens?

Kind regards,
HakonB

Exception:

System.Configur ation.Configura tionException: Unable to load configuration
from the XML configuration file: 'C:\Program Files\MyApp\MyA pp.exe.config'.
This can be caused by a number of problems, but the most common problem
is an incorrectly configured Updater configuration file.
The most probable sources of error are: missing nodes, incorrect
attribute names, white space within attributes or within elements,
white space between elements in the same sub-node, badly formed xml,
or xml that does not conform to the ConfigSchema.XS D. ---> System.Configur ation.Configura tionException:
Exception in configuration section handler (C:\Program Files\MyApp\MyA pp.exe.config
line 16) ---> System.IO.FileN otFoundExceptio n: File or assembly name _zdvwu31.dll,
or one of its dependencies, was not found. File name: "_zdvwu31.d ll"
at System.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String codeBase,
Boolean isStringized, Evidence assemblySecurit y, Boolean throwOnFileNotF ound,
Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Int ernalLoad(Assem blyName assemblyRef, Boolean
stringized, Evidence assemblySecurit y, StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Loa d(AssemblyName assemblyRef, Evidence assemblySecurit y)
at System.CodeDom. Compiler.Compil erResults.get_C ompiledAssembly ()
at System.CodeDom. Compiler.Compil erResults.get_C ompiledAssembly ()
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 DSUpdater.Updat erSectionHandle r.System.Config uration.IConfig urationSectionH andler.Create(O bject
parent, Object configContext, XmlNode section) in C:\Projects\MyA pp\MyApp\Config SectionHandler. cs:line
55
at System.Configur ation.Configura tionRecord.Eval uateRecursive(I ConfigurationSe ctionHandler
factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)

=== Pre-bind state information ===
LOG: Where-ref bind. Location =
C:\DOCUME~1\Use r\LOCALS~1\Temp \_zdvwu31.dll
LOG: Appbase = C:\Program Files\MyApp\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private,
custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL
file:///C:/DOCUME~1/User/LOCALS~1/Temp/_zdvwu31.dll.

--- End of inner exception stack trace ---
at
System.Configur ation.Configura tionRecord.Eval uateRecursive(I ConfigurationSe ctionHandler
factory, Object config, String[] keys, Int32 iKey, XmlTextReader reader)
at System.Configur ation.Configura tionRecord.Eval uate(String configKey)
at System.Configur ation.Configura tionRecord.Reso lveConfig(Strin g configKey)
at System.Configur ation.Configura tionRecord.GetC onfig(String configKey)
at System.Configur ation.DefaultCo nfigurationSyst em.System.Confi guration.IConfi gurationSystem. GetConfig(Strin g
configKey)
at System.Configur ation.Configura tionSettings.Ge tConfig(String sectionName)
at DSUpdater.Updat erConfiguration .Init() in C:\Projects\MyA pp\MyApp\Update rConfiguration. cs:line
133
--- End of inner exception stack trace ---
at DSUpdater.Appli cationUpdateMan ager..ctor() in C:\Projects\MyA pp\DSUpdater\Ap plicationUpdate r.cs:line
98
at MyApp.Client.Se rvices.SmartUpd ateService.Init ialize(Form form) in C:\Projects\MyA pp\MyApp\Servic es\SmartUpdateS ervice.cs:line
32
at MyApp.Client.Ma inForm.Handler_ CheckForUpdates (Object sender, EventArgs
e) in C:\Projects\MyA pp\MyApp\MainFo rm.cs:line 570
at MyApp.Common.Ac tionHandler.Exe cuteHandler(Obj ect sender, EventArgs args)
in C:\Projects\MyA pp\MyCommon\Gen eral\ActionDisp atcher.cs:line 252
at MyApp.Common.Ge neral.ActionDis patcher.Fire(St ring handlerName, Object
sender, EventArgs args) in C:\Projects\MyA pp\MyCommon\Gen eral\ActionDisp atcher.cs:line
195
at MyApp.Client.Ma inForm.MainForm _Load(Object sender, EventArgs e) in C:\Projects\MyA pp\MyApp\MainFo rm.cs:line
423
at System.Windows. Forms.Form.OnLo ad(EventArgs e)
at System.Windows. Forms.Form.OnCr eateControl()
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl()
at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
at System.Windows. Forms.Form.WndP roc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)

Nov 12 '05 #1
0 1615

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

Similar topics

37
5003
by: Ben | last post by:
Hi, there. Recently I was working on a problem where we want to save generic closures in a data structure (a vector). The closure should work for any data type and any method with pre-defined signature. When developing this lib, I figured that the pointer-to-member-function, although seemingly an attractive solution, does not work well for us.
1
1498
by: Dan | last post by:
Hello, I am having trouble serializing a typed dataset that has a number of expression columns. When I attempt to serialize the dataset, the framework (.NET 1.1) throws a NullRefException. After a little research I've come across Microsoft KB 818587 (link below), which describes a similar problem that is encountered when serializing datasets containing row errors. http://support.microsoft.com/default.aspx?scid=kb;en-us;818587 In the...
5
2822
by: francois | last post by:
First of all I would to to apologize for resending this post again but I feel like my last post as been spoiled Here I go for my problem: Hi, I have a webservice that I am using and I would like it to return an XML serialized version of an object.
4
3309
by: Alexander | last post by:
There was such problem, At compilation with SP1 (dotnetfx11SP1) On computers without him{it} some objects. For example (System. Collections. Comparer) and together with it{him} and all objects in which it{he} is used, for example ArrayList Whether it is possible to bypass it somehow
3
2458
by: Alexander | last post by:
When i store rule on PC with .NET.SP1 i cant restore them from PC without SP1. An i get this Error: System.Runtime.Serialization.SerializationException: Possible Version mismatch. Type System.Collections.Comparer has 1 members, number of members deserialized is 0. at System.Runtime.Serialization.Formatters.Binary.ReadObjectInfo.GetMemberTypes(String
10
1403
by: Jesper | last post by:
Hi, I'm writing a program which is, and will continue to be, constantly extended with functionality that require information. Until now the source of this information has been found and modified using notepad in a txt file that was parsed into fields in objects. (This solution because this was the format that an older fortran program was using and we needed to do it in this way in a transition period). Now I would like be able to save...
4
1804
by: mdb | last post by:
I have a class (very simple int type data, as shown below) that I have serialized to disk. In my next version of the program, I have added some variables to that class. I'm expecting that this will break the serialization when I try to load the object from disk. I know there is something in .NET 2.0 to handle this, but how can I do it with .NET 1.1? Some sample code would be much appreciated... // The old version class Data
1
2456
by: Tim Anderson | last post by:
I have an app that uses the SOAP serializer to serialize and deserialize a object of a certain class to a file. The class implements ISerializable. From time to time it is necessary to add or remove fields from the class. I've been able to deserialize out-of-date versions by handling serialization exceptions in Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext). I've now hit a problem. With the latest version, if...
3
2642
by: Zachary Turner | last post by:
Hello, I have a situation where I would like to perform custom serialization and deserialization of an existing .NET framework object (specifically, System.DateTime). Is there a common paradigm here, for how I can override the default behavior of DateTime serialization and provide my own? I want to use this custom serialized DateTime in many places, and don't want to provide custom serialization routines for every single object that...
0
8827
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8723
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
9207
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
9120
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
9053
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...
1
6652
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4481
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...
1
3182
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2122
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.