Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Membership Provider (http://www.velocityreviews.com/forums/t114977-membership-provider.html)

Morgan 12-06-2005 05:15 PM

Membership Provider
 
Sorry for cross post, forgot to include aspnet in orinal...

Thanks in advance for any assistance.

I'm in the process of implementing custom RoleProvider & Membership Provider
objects and have run into a snag with the Membership Provider.

It seems many of the MembershipUser properties are read-only. This seems,
well stupid, IMO.

I can override these in a class that inherits from MembershipUser and set
them via parameters in the constructor, but that's a lot of work for what
seems should be read-write properties, especially when implementing a custom
provider for another data store. For example, IsLockedOut is read
only?Shouldn't I be able to write to this property when returning a
MembershipUser for the GetUser method?

My question is, is there any other way to access these read only properties?
Have I missed something obvious?

Thanks again,

Morgan



Steven Cheng[MSFT] 12-07-2005 03:58 AM

RE: Membership Provider
 
Hi Morgan,

Welcome to ASPNET newsgroup.
As for the MembershipUser class, yes, it has many properteis defined as
readonly. Based on my understanding, those properties are mainly configured
through administration interfaces(most of such methods are defined in
MembershipProvider class), e.g lock a user when the user created and then
active through updating later(through the
SqlMembershipProvider.UnlockUser()).... And all these information stored in
database should not changed outside by normal client application which use
the membership info.... Client application just need to query these
information through GetUser method(retrieved from backend database
storage).... I think that's the reason the buildin MembershipUser class
marked them as readonly .... Of course, we can override or replace them
to all read/writeable in our custom membership framework....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)






--------------------
| From: "Morgan" <abcd@senditon.com>
| Subject: Membership Provider
| Date: Tue, 6 Dec 2005 12:15:29 -0500
| Lines: 25
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#HQKhfo#FHA.1988@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 168-215-79-61.gen.twtelecom.net 168.215.79.61
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:363128
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Sorry for cross post, forgot to include aspnet in orinal...
|
| Thanks in advance for any assistance.
|
| I'm in the process of implementing custom RoleProvider & Membership
Provider
| objects and have run into a snag with the Membership Provider.
|
| It seems many of the MembershipUser properties are read-only. This seems,
| well stupid, IMO.
|
| I can override these in a class that inherits from MembershipUser and set
| them via parameters in the constructor, but that's a lot of work for what
| seems should be read-write properties, especially when implementing a
custom
| provider for another data store. For example, IsLockedOut is read
| only?Shouldn't I be able to write to this property when returning a
| MembershipUser for the GetUser method?
|
| My question is, is there any other way to access these read only
properties?
| Have I missed something obvious?
|
| Thanks again,
|
| Morgan
|
|
|


Morgan 12-08-2005 02:15 AM

Re: Membership Provider
 
Thanks, Steven.

"Steven Cheng[MSFT]" <stcheng@online.microsoft.com> wrote in message
news:iCpF$Ju%23FHA.4000@TK2MSFTNGXA02.phx.gbl...
> Hi Morgan,
>
> Welcome to ASPNET newsgroup.
> As for the MembershipUser class, yes, it has many properteis defined as
> readonly. Based on my understanding, those properties are mainly
> configured
> through administration interfaces(most of such methods are defined in
> MembershipProvider class), e.g lock a user when the user created and then
> active through updating later(through the
> SqlMembershipProvider.UnlockUser()).... And all these information stored
> in
> database should not changed outside by normal client application which use
> the membership info.... Client application just need to query these
> information through GetUser method(retrieved from backend database
> storage).... I think that's the reason the buildin MembershipUser class
> marked them as readonly .... Of course, we can override or replace them
> to all read/writeable in our custom membership framework....
>
> Thanks,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>
>
>
>
> --------------------
> | From: "Morgan" <abcd@senditon.com>
> | Subject: Membership Provider
> | Date: Tue, 6 Dec 2005 12:15:29 -0500
> | Lines: 25
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
> | X-RFC2646: Format=Flowed; Original
> | Message-ID: <#HQKhfo#FHA.1988@TK2MSFTNGP12.phx.gbl>
> | Newsgroups: microsoft.public.dotnet.framework.aspnet
> | NNTP-Posting-Host: 168-215-79-61.gen.twtelecom.net 168.215.79.61
> | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
> | Xref: TK2MSFTNGXA02.phx.gbl
> microsoft.public.dotnet.framework.aspnet:363128
> | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> |
> | Sorry for cross post, forgot to include aspnet in orinal...
> |
> | Thanks in advance for any assistance.
> |
> | I'm in the process of implementing custom RoleProvider & Membership
> Provider
> | objects and have run into a snag with the Membership Provider.
> |
> | It seems many of the MembershipUser properties are read-only. This
> seems,
> | well stupid, IMO.
> |
> | I can override these in a class that inherits from MembershipUser and
> set
> | them via parameters in the constructor, but that's a lot of work for
> what
> | seems should be read-write properties, especially when implementing a
> custom
> | provider for another data store. For example, IsLockedOut is read
> | only?Shouldn't I be able to write to this property when returning a
> | MembershipUser for the GetUser method?
> |
> | My question is, is there any other way to access these read only
> properties?
> | Have I missed something obvious?
> |
> | Thanks again,
> |
> | Morgan
> |
> |
> |
>




Steven Cheng[MSFT] 12-08-2005 02:32 AM

Re: Membership Provider
 
You're welcome Norgan,

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Morgan" <nomail@spam.com>
| References: <#HQKhfo#FHA.1988@TK2MSFTNGP12.phx.gbl>
<iCpF$Ju#FHA.4000@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: Membership Provider
| Date: Wed, 7 Dec 2005 21:15:20 -0500
| Lines: 89
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <OF#y505#FHA.3096@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 12-222-91-80.client.insightbb.com 12.222.91.80
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:363534
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks, Steven.
|
| "Steven Cheng[MSFT]" <stcheng@online.microsoft.com> wrote in message
| news:iCpF$Ju%23FHA.4000@TK2MSFTNGXA02.phx.gbl...
| > Hi Morgan,
| >
| > Welcome to ASPNET newsgroup.
| > As for the MembershipUser class, yes, it has many properteis defined as
| > readonly. Based on my understanding, those properties are mainly
| > configured
| > through administration interfaces(most of such methods are defined in
| > MembershipProvider class), e.g lock a user when the user created and
then
| > active through updating later(through the
| > SqlMembershipProvider.UnlockUser()).... And all these information
stored
| > in
| > database should not changed outside by normal client application which
use
| > the membership info.... Client application just need to query these
| > information through GetUser method(retrieved from backend database
| > storage).... I think that's the reason the buildin MembershipUser
class
| > marked them as readonly .... Of course, we can override or replace
them
| > to all read/writeable in our custom membership framework....
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| >
| >
| > --------------------
| > | From: "Morgan" <abcd@senditon.com>
| > | Subject: Membership Provider
| > | Date: Tue, 6 Dec 2005 12:15:29 -0500
| > | Lines: 25
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | X-RFC2646: Format=Flowed; Original
| > | Message-ID: <#HQKhfo#FHA.1988@TK2MSFTNGP12.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: 168-215-79-61.gen.twtelecom.net 168.215.79.61
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:363128
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Sorry for cross post, forgot to include aspnet in orinal...
| > |
| > | Thanks in advance for any assistance.
| > |
| > | I'm in the process of implementing custom RoleProvider & Membership
| > Provider
| > | objects and have run into a snag with the Membership Provider.
| > |
| > | It seems many of the MembershipUser properties are read-only. This
| > seems,
| > | well stupid, IMO.
| > |
| > | I can override these in a class that inherits from MembershipUser and
| > set
| > | them via parameters in the constructor, but that's a lot of work for
| > what
| > | seems should be read-write properties, especially when implementing a
| > custom
| > | provider for another data store. For example, IsLockedOut is read
| > | only?Shouldn't I be able to write to this property when returning a
| > | MembershipUser for the GetUser method?
| > |
| > | My question is, is there any other way to access these read only
| > properties?
| > | Have I missed something obvious?
| > |
| > | Thanks again,
| > |
| > | Morgan
| > |
| > |
| > |
| >
|
|
|



All times are GMT. The time now is 09:59 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.