Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7923807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:26:06+00:00 2026-06-03T17:26:06+00:00

I followed a tutorial online to use the built in asp.net profiler but it’s

  • 0

I followed a tutorial online to use the built in asp.net profiler but it’s not getting the profile. It return null everytime when running GetUserProfile:

Here is my code for invoking:

        if (UserProfile.GetUserProfile() == null)
        {
            UserProfile.Create(Membership.GetUser().UserName);
        }
        UserProfile currentProfile = UserProfile.GetUserProfile();
        currentProfile.WorksAt = "WorksAt Test";
        currentProfile.Manages = "Manages Test";
        String WorksAt = currentProfile.WorksAt;
        String Manages = currentProfile.Manages;

Here is my code for the Profile Class:

        using System.Web.Profile;
        using System.Web.Security;

        public class UserProfile : ProfileBase
        {
            [SettingsAllowAnonymous(false)]
            public string WorksAt
            {
                get { return base["WorksAt"] as string; }
                set { base["WorksAt"] = value; }
            }

            [SettingsAllowAnonymous(false)]
            public string Manages
            {
                get { return base["Manages"] as string; }
                set { base["Manages"] = value; }
            }

            public static UserProfile GetUserProfile(string username)
            {
                return Create(username) as UserProfile;
            }

            public static UserProfile GetUserProfile()
            {
                return Create(Membership.GetUser().UserName) as UserProfile;
            }
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T17:26:08+00:00Added an answer on June 3, 2026 at 5:26 pm

    Figure it out from a tutorial online, I needed to add inherits=”UserProfile” when defining the profile provider in Web.config:

    <profile defaultProvider="TestServerProfile" inherits="UserProfile">
            <providers>
                <clear/>
                <add name="TestServerProfile" type="System.Web.Profile.SqlProfileProvider" connectionStringName="TestServerConnection" applicationName="/"/>
            </providers>
      <properties>
        <group name="UserInformation">
          <add name="WorksAt" type="String" serializeAs="String" defaultValue=""  />
          <add name="Manages" type="String" serializeAs="String" defaultValue=""  />
        </group>
      </properties>
        </profile>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I followed this tutorial to create a sample Login application using ASP.NET MVC I
I followed a tutorial I found online to create a tableview with sections and
I followed this tutorial http://www.tugberkugurlu.com/archive/api-key-authorization-through-query-string-in-asp-net-web-api-authorizationfilterattribute to create custom Authorization filter. I have CarController with
I followed this tutorial and got the basics of Content Providers : http://www.vogella.de/articles/AndroidSQLite/article.html But
Followed this tutorial on getting autocomplete for CI to work with Eclipse http://taggedzi.com/articles/display/autocomplete-eclipse-codeigniter-2 -
Having followed a tutorial online, I have a sessions controller that looks like: class
I followed several tutorial to make this work, but I can't get draggable items.
I followed a tutorial online on how to receive push notifications on Android. Got
I have found this tutorial online http://net.tutsplus.com/tutorials/php/creating-a-php5-framework-part-1/ I have created myself a simple sort
I have followed an example tutorial online for integrating in-app purchases in to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.