New Posts New Posts RSS Feed: Error When Registering User
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Error When Registering User

 Post Reply Post Reply
Author
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Topic: Error When Registering User
    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
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down