Passing Custom Principal as Parameter?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




I have two custom classes that implement IPrincipal and IIdentity. The
Principal class and Identity classes are built somewhere else in the
infrastructure and the Identity is used to build the Principal.

The class that implements IIDentity has this:

[DataMember]
public bool IsAuthenticated
{
get
{
return this.isauth;
}
}

However, when my custom Principal is passed to a WCF remote method
that takes IPrincipal as a parameter, among other errors, I get this:

"
System.Runtime.Serialization.InvalidDataContractException: No set
method for property 'IsAuthenticated' in type '......TrueIdentity'..
"

I can't modify IsAuthenticated with a "set" because then it won't
implement IIdentity correctly.

What is the right way to handle this?

Thanks.


.



Relevant Pages

  • Re: Passing Custom Principal as Parameter?
    ... I have two custom classes that implement IPrincipal and IIdentity. ... Principal class and Identity classes are built somewhere else in the ... when my custom Principal is passed to a WCF remote method ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Passing Custom Principal as Parameter?
    ... I have two custom classes that implement IPrincipal and IIdentity. ... Principal class and Identity classes are built somewhere else in the ... when my custom Principal is passed to a WCF remote method ...
    (microsoft.public.dotnet.framework.aspnet.webservices)