Results 1 to 7 of 7

Thread: Should i use Membership and profile Providers

  1. #1

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Should i use Membership and profile Providers

    Hi Guys,

    I'm working on a new website. Kind of like a social networking one. Where you have a user table. The user will have a profile with fields like Firstname, ProfileImage, date of Birth etc. Now I'm using MySQL 5 and asp.net. I'm just wondering whether I should create my own tables or use the membership ones. I have build a custom mysql provider but I don't know if I should go the Provider route. Please advise. I need to be able to let users invite friends etc. Do you guys see any issues arising in this scenario? How can I store a users profile image for example if i use providers?

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Should i use Membership and profile Providers

    Hello,

    To say to rewriting a lot of code, unless you already have a predefined set of tables and schema, I would say just go ahead and use the built in providers for both Membership and Profile.

    Yeah, some people say that they are bloated, but in my opinion, they do a good job, and do exactly what they say they do.

    Gary

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Should i use Membership and profile Providers

    Quote Originally Posted by Nitesh View Post
    How can I store a users profile image for example if i use providers?
    This could just be another profile property, i.e. the URL to where the image is stored.

    Or, better still, you could integrate gravatar's into your application:

    http://weblogs.asp.net/jgalloway/arc...n-asp-net.aspx

    Gary

  4. #4

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Should i use Membership and profile Providers

    thanks Gary. would it be difficult to add the gravatar functionality to the page where a user enters their profile information? I can't find any examples also can I give the user the ability to change their profile picture if I use gravatar
    Last edited by Nitesh; Feb 13th, 2012 at 01:59 AM.

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Should i use Membership and profile Providers

    Hello,

    It's shouldn't be, no. The gravatar is driven off their email address, and should just work.

    Didn't the link that I provide show you how to do it?

    From a very quick read of the article, I thought that it did.

    Gary

  6. #6

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Should i use Membership and profile Providers

    hey gary,

    I've done a custom membership provider to work with mySQL. still busy on the profile provider. I've just finished the login part. Now I am able to get the logged in user id like this:

    Code:
        Private iUser As Integer = Membership.GetUser(HttpContext.Current.User.Identity.Name).ProviderUserKey
    However, I am using JQuery.load to load a specific div. I pass through the user id in the query string. I need to get the logged in users id in javascript. Is it possible to use the membership object is javascript?

  7. #7
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Should i use Membership and profile Providers

    Hello,

    Are you creating a Custom Membership Provider because you already have an existing database? If you don't already have an existing database, why not simply use the Membership Provider that ships with the MySql Data Provider?

    No, you will not be able to use it directly. You would need to, for instance, serialise it to JSON, and then consume that on the client side.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width