I noticed this wierd problem when implementing ISerializable for a value
type.
The MSDN documentation (and FxCop) say The GetObjectData method should be
marked with [SecurityPermissionAttribute(SecurityAction.Demand,
SerializationFormatter=true)]
( http://www.gotdotnet.com/team/fxcop/...jectData.html).
When I mark my value type's GetMethodData method with the above CAS
deleration I get a wierd SEHException during serialization.
Without the above CAS decleration, serialization\deserialization runs
fine...
Reference types on the other hand work fine with the above CAS
decleration...
Any idea why this is happening?
Eran Kampf http://www.ekampf.com 7 1274
Hi Eran,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you're having problem whan adding
permission checking to a value type serialization. If there is any
misunderstanding, please feel free to let me know.
Based on my research, I haven't get any result on this. I have tried it on
my computer and seems works well. Could you give me a repro here so that I
can try to work on this issue, since SEHException is a very general
exception. We need further research to see what is going wrong with it.
Thanks!
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Hi Eran,
Thanks for your repro code. I have reviewed this issue and are currently
researching on it. I will update you ASAP. Thanks for your patience!
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Any news on the topic? Did you manage to reproduce the bug?
Eran Kampf http://www.ekampf.com
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:9Q**************@cpmsftngxa06.phx.gbl... Hi Eran,
Thanks for your repro code. I have reviewed this issue and are currently researching on it. I will update you ASAP. Thanks for your patience!
Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights."
Hi Eran,
Sorry that I haven't updated you for some days. Yes, I have reproduced it.
This issue seems to be complex and I have reported it to the product team.
Currently I'm waiting for their responses. I will update you as soon as I
get any update. Thank you very much for your patience!
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
At this point, we are waiting for a reply from the Product team on this
issue. I should get an answer by tomorrow.
Anand Balasubramanian
Microsoft, Visual C# .NET
This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks
Any news?
Eran Kampf http://www.ekampf.com
"Anand Balasubramanian(MSFT)" <an****@online.microsoft.com> wrote in message
news:c$**************@cpmsftngxa06.phx.gbl... At this point, we are waiting for a reply from the Product team on this issue. I should get an answer by tomorrow.
Anand Balasubramanian Microsoft, Visual C# .NET
This posting is provided "AS IS" with no warranties, and confers no rights. Please reply to newsgroups only. Thanks
The product team looked at the issue and the problem is as follows
Tssue has to do with having a declarative security demand on a method that
is the implementation of an interface AND the type that implements the
interface is a value type
The problem has been fixed in whidbey. For now the workaround suggested is
to Convert the declarative demand to an imperative demand inside
GetObjectData().
Please let me know if you need any more information.
Thanks
Anand Balasubramanian
Microsoft, Visual Basic .NET
This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Eran Kampf |
last post by:
I noticed this wierd problem when implementing ISerializable for a value
type.
The MSDN documentation (and FxCop) say The GetObjectData method should be
marked with ...
|
by: Mike Pollett |
last post by:
Hi, I have used the ISerializable interface before and the code below worked
fine. Until I derived it from CollectionBase. The code will still serialize
and deserialize the properties in this class...
|
by: Mike Pollett |
last post by:
Hi, I have used the ISerializable interface before and the code below worked
fine. Until I derived it from CollectionBase. The code will still serialize
and deserialize the properties in this class...
|
by: Dave Veeneman |
last post by:
I use binary serialization for file storage in an application I am creating.
Right now, I'm using simple serialization with a attribute.
Now, let's say I create a later version with a modified...
|
by: Zach |
last post by:
When it is being said that, "value types are created on the stack or inline as part of an
object". If a value type is created in an object, and that object is being
called, the value type in that...
|
by: Frans Bouma |
last post by:
Hi,
I have a serious problem with VB.NET and a DataTable derived class and I
can't figure out how to solve it. I have implemented it in C# where it
works perfectly, but I can't port one...
|
by: herc |
last post by:
Here is what MSDN says about the constructor that is needed when
implementing the ISerializable interface:
"The ISerializable interface implies a constructor with the signature
constructor...
|
by: j.askey |
last post by:
Hi,
I have a class that is inherited from Panel. Because Panel is not
serializable, I have implemented the ISerializable interface on this class
and I can sucessfully save and load classes from...
|
by: RRB |
last post by:
Hi,
I have a class library in which I have classes which implement
ISerializable. They all have GetObjectData implementations and
constructors to support deserialization.
In unit testing this...
|
by: Rene |
last post by:
OK, I give up, the msdn help for custom serialization:
http://msdn2.microsoft.com/en-us/library/ty01x675(VS.90).aspx
Hs the following paragraph on it:
-----
In addition, you should not use...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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,...
| |