473,662 Members | 2,622 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Serialization Issue

I recently added a new property to a base object that had a property with a
protected set. After adding the new propery to the class that inherited from
that class, I get the below error. This web service was working until this
change.

System.InvalidO perationExcepti on: Unable to generate a temporary class
(result=1).
error CS0272: The property or indexer 'USI.Data.Commo n.BizBase.IsVal id'
cannot be used in this context because the set accessor is inaccessible
error CS0272: The property or indexer 'USI.Data.Commo n.BizBase.IsVal id'
cannot be used in this context because the set accessor is inaccessible

at System.Xml.Seri alization.Compi ler.Compile(Ass embly parent, String ns,
CompilerParamet ers parameters, Evidence evidence)
at System.Xml.Seri alization.TempA ssembly.Generat eAssembly(XmlMa pping[]
xmlMappings, Type[] types, String defaultNamespac e, Evidence evidence,
CompilerParamet ers parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Seri alization.TempA ssembly..ctor(X mlMapping[] xmlMappings,
Type[] types, String defaultNamespac e, String location, Evidence evidence)
at System.Xml.Seri alization.XmlSe rializer.FromMa ppings(XmlMappi ng[]
mappings, Evidence evidence)
at
System.Web.Serv ices.Protocols. XmlReturn.GetIn itializers(Logi calMethodInfo[]
methodInfos)
at
System.Web.Serv ices.Protocols. XmlReturnWriter .GetInitializer s(LogicalMethod Info[]
methodInfos)
at System.Web.Serv ices.Protocols. MimeFormatter.G etInitializers( Type type,
LogicalMethodIn fo[] methodInfos)
at System.Web.Serv ices.Protocols. HttpServerType. .ctor(Type type)
at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( )
at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing )

Here is a simplified version of the code :

[XmlIgnore(), SoapIgnore()]
public override bool IsValid {
get {
return true;
}
protected set {
//throw new Exception("The method or operation is not
implemented.");
}
}

As you can see I tried adding the xmlignore and the soapignore properties to
no avail. I have to override the IsValid because it is abstract as well.
Dec 5 '05 #1
0 1247

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

Similar topics

37
4988
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.
2
6195
by: Dominic | last post by:
Hi everybody, I'm planning to use serialization to persist an object (and possibly its child objects) in my application. However, I'm concerned about the backward compatibility issue. I'm evaluating if we can easily resolve this issue. For example, I have a class MyClass consisting of 100 fields.
6
2709
by: Uttam | last post by:
Hello, We are at a very crucial decision making stage to select between .Net and Java. Our requirement is to download a class at runtime on the client computer and execute it using remoting or rmi. Just to keep my question short I am posting trimmed version of my code. //file: Serializable.cs
3
2867
by: Steve | last post by:
I've been following a couple remoting tutorials on the web, they are all pretty much the same. I've got my different applications built(client, server and remote object (dll)) The client is able to get a reference to the remote object and that works fine. When I try to make a call to a remote object's method I get an exception: System.Runtime.Serialization.SerializationException: Cannot find the assembly ProcessTest,...
5
2119
by: George Ter-Saakov | last post by:
I have 2 classes one is document and another is collection of documents. When i am trying to use XmlSerializer to serialize class which has clsDcoumentIds member variable i am getting an exception "System.InvalidOperationException: The type clsDocumentId was not expected." public class clsDocumentId { string _sDocumentId; public clsDocumentId() {}
7
1790
by: Joe | last post by:
I've tracked the performance issue down to a single class. This class derives from CollectionBase and stores a basic value type such as string, int, double, etc... I also store the type itself which you can see I'm using when calling AddValue. I implemented ISerializable and GeteObjectData. Here's what I tried: for (int i = 0; i < this.Count; i++) info.AddValue("item" + i.ToString(), this, typeof(type) );
1
1894
by: Rucha | last post by:
We are using ACAServices in our project, and are passing entity classes as parameters to the ACAServiceMethod. We are using a private variable entityState to indicate whether the entity is new/updated and so on. At present we are not using any custom serialization in our project, we just decorate the entity class with “Serializable” attribute as shown below:
1
11092
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
2
9638
by: compurhythms | last post by:
I have a .NET Windows Service that needs to run without interruption for long periods of time (weeks or months). Everything works great except that every once in a great while I get the following type of exception when reading data from a file via XML Serialization: System.IO.FileNotFoundException: Could not find file 'C:\WINDOWS\TEMP \muodpwwm.dll'. (see rest of call stack below). The problem is that the serialization works for...
3
1522
by: girish574 | last post by:
After the integration of boost serialization code, the exceptions are not at all getting caught in my application. Im building on RHEL4 kernel 2.6.9-42.ELsmp and gcc version is 4.0.2. The application terminates when exception is thrown. Removing the serialization code makes the exceptions getting caught. The worst part is im not able to reproduce the scenario in a small program.
0
8432
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
8857
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
8764
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
8546
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
7367
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 projectplanning, coding, testing, and deploymentwithout 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...
1
6186
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
4180
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
2762
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
2
1752
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.