473,408 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Problem with instantiation XmlSerializer

peochei
12
I've a problem while creating new instance of XmlSerializer. I thought it could occur because of improper solution platform. But I checked all possibilities.

Machine config:
  • Windows XP SP3
  • .NET 3.5 SP1

Any suggestions how to track the problem?

Here's what I got:
Expand|Select|Wrap|Line Numbers
  1. System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section system.serviceModel. (E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 134)
  2.    at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
  3.    at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
  4.    at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
  5.    at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
  6.    --- End of inner exception stack trace ---
  7.    at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
  8.    at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
  9.    at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
  10.    at System.Configuration.ConfigurationManager.GetSection(String sectionName)
  11.    at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
  12.    at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
  13.    at System.Diagnostics.DiagnosticsConfiguration.Initialize()
  14.    at System.Diagnostics.DiagnosticsConfiguration.get_SwitchSettings()
  15.    at System.Diagnostics.Switch.InitializeConfigSettings()
  16.    at System.Diagnostics.Switch.InitializeWithStatus()
  17.    at System.Diagnostics.Switch.get_SwitchSetting()
  18.    at System.Diagnostics.BooleanSwitch.get_Enabled()
  19.    at System.Xml.Serialization.TempAssembly.LoadGeneratedAssembly(Type type, String defaultNamespace, XmlSerializerImplementation& contract)
  20.    at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
  21.    at System.Xml.Serialization.XmlSerializer..ctor(Type type)
  22. (...)
  23.  
Oct 26 '10 #1

✓ answered by peochei

Strange enough.
I solved it by copying 'WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config \machine.config' from different computer.

2 3922
peochei
12
Strange enough.
I solved it by copying 'WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config \machine.config' from different computer.
Oct 27 '10 #2
Plater
7,872 Expert 4TB
It sounds like the install for .NET2.0 got corrupted. Copying a file over from another PC isn't exactly "safe", but 9/10 is probably fine
Oct 27 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Alexis | last post by:
Hello, I have a set of classes I created from schema files using the xsd.exe tool. I'm using namespaces in the clases ( I had to because I have some classes with the same name but not the same...
12
by: SJD | last post by:
I've just read Christoph Schittko's article on XmlSerializer: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp . . . and very informative it is too....
4
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...
3
by: Don McNamara | last post by:
Hi, I've hit quite a strange problem with XmlSerializer on my W2K3 server. When I serialize/deserialize using an exe on my local computer (XP), everything works fine. When I put the code out on...
1
by: jw56578 | last post by:
When i make a call to XmlSerializer xs = new XmlSerializer(System.Type.GetType("myobject")); I get this error Key cannot be null. Parameter name: key what is the cause of this?
3
by: David Pendleton | last post by:
Hello all. The following code... Dim objXMLSerializer As XmlSerializer objXMLSerializer = New XmlSerializer(GetType(Settings)) ....generates the following exception in my application...
1
by: Armond VanHeusen | last post by:
I have an application with a bunch of DLLs that are loaded in as plugins. In one of these I am trying to get XMLSerialization to work but with little success. I then tried some very simple code...
0
by: PSingh | last post by:
Hi, I know this is a frequently asked question but have tried several combinations and cant seem to figure this out. I am serializing my object as follows: XmlSerializer serializer = new...
0
by: Kristopher Wragg | last post by:
Hi, I'm having a problem with XMLSerializer, I have classes like the following: public abstract class EulerObject { private Rectangle rect; private string guid = "";
3
by: sklett | last post by:
I have several objects that I'm saving to disk via the XmlSerializer. 80% of the time this works fine, but occasionaly it will create a file like this: <?xml version="1.0"?> <SystemOptions...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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,...
0
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...

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.