Re: Custom Profile Provider



If you derive from ProfileBase and set the inherits in web.config you can access the values just using your properties...what's the problem?
-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)

Ok, when I first started to play with the Provider model for all
things membership in ASP.NET 2.0, I have to say I was pleased... but I
must have missed something here...

I've got two questions...

1) I'd like to have profile be a strongly typed complex object derived
from profilebase. I've edited in web.config to change <provider
name="" inherits="MyNamespace.CustomProfile">.

I would like to simply construct this object with my homebrew OR
Mapper, which I beleive I can get the context (a user id, or a
username)

But the only way I can return data from the ProfileProvider is through
a collection of name/value pairs? That seems extremely lame.

Should I just scrap the profiles all together and somehow assign
equivalent of a profile on Authentication?
any one have any advice that way? It looks like it was designed to be
able to use custom strongly typed complex objects, I just don't know
how
to populate the object.
2) How does one DEBUG a custom profile provider extension? I build
both the parent web project in debug mode, as well as the custom
provider as well. When I set a breakpoint and hit start, it'll always
say either "No symbols loaded for this document" or "There is no
executable code at this line numbers"

I want it to break in Initialize() method, when should I expect it to
break (application start is what I would have guessed)

Please any input would be greatly appreciated.
Weston


.



Relevant Pages

  • Custom Profile Provider
    ... Ok, when I first started to play with the Provider model for all things membership in ASP.NET 2.0, I have to say I was pleased... ... I'd like to have profile be a strongly typed complex object derived from profilebase. ... Should I just scrap the profiles all together and somehow assign equivalent of a profile on Authentication? ... It looks like it was designed to be able to use custom strongly typed complex objects, I just don't know how to populate the object. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Custom Profile Provider
    ... I am curious as to why they didnt allow you to return a Profile, eg, they feed you a customer id, or custoer name, and expect you to return a Profile object. ... Instead they cripple the provider interface and dont let you get that low yourself. ... How does one DEBUG a custom profile provider extension? ... both the parent web project in debug mode, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: getting Membership userid to use and store in a custom databas
    ... | when you update the Profile, the current user has actually login the web ... | Sub btnUpdatePreferences_Click(ByVal sender As Object, ... | In addition, to use CustomClass in Profile, we can just define a custom ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • RE: getting Membership userid to use and store in a custom databas
    ... when you update the Profile, the current user has actually login the web ... the underlying persistent store. ... Then, we can access the custom class properties in Profile, just as other ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Include and Include File
    ... associated with the use of .ascx files and user controls. ... is setting up login views and setting up views by roles. ... There is also Profiles, but the default Profile bits have never worked ... it is easy enough to create a custom provider. ...
    (microsoft.public.dotnet.framework.aspnet)