Print Page | Close Window

Error When Registering User

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2610
Printed Date: 29-Jul-2026 at 8:30pm


Topic: Error When Registering User
Posted By: gregweb
Subject: Error When Registering User
Date Posted: 06-Apr-2011 at 12:40pm
Using the DevForce SL Business Template.
 
I go to the Registration form, and register.
 
It then returns the following error message:
 
The data contract type 'Jet.Models.Login.CreateUserResult' cannot be deserialized because the property 'Status' does not have a public setter. Adding a public setter will fix this error. Alternatively, you can make it internal, and use the InternalsVisibleToAttribute attribute on your assembly in order to enable serialization of internal members - see documentation for more details. Be aware that doing so has certain security implications.
 
This is the current code:
 
 	[DataMember]
        public CreateUserStatus Status { getinternal set; }
 
If I change it to:
 
[DataMember]
public CreateUserStatus Status { getset; }
 
it then works.  Also the same applies for the ValidationErrors property.  I tried using the InternalsVisibleToAttribute, but couldn't get that to work. 
 
Greg



Replies:
Posted By: sbelini
Date Posted: 06-Apr-2011 at 3:28pm
Hi Greg,
 
I can't repro the issue here.
 
If I understood, you got the error with the bare SL Business template. If not, could you clarify what else you have changed? (or provide a small solution reproducing the issue)


Posted By: gregweb
Date Posted: 06-Apr-2011 at 4:32pm
Yes, your correct, it does work fine.
 
My project somehow had the InternalsVisibleToAttribute commented out in AssemblyInfo.cs.  Once I put that back in it works fine.
 
Greg



Print Page | Close Window