1

I am using aspnet membership profile and Inherited the profileBase class to a class name UserProfile, where I have defined the method GetProfile. Everything working fine But while build getting the above warning.

Please help how to remove the warning. Below the sample codes.

public static UserProfile GetProfile(string userName)
        {
            return (UserProfile)Create(userName);
        }

        public static UserProfile GetProfile(string username, bool authenticated)
        {
            return (UserProfile)Create(username, authenticated);
        }

        public static UserProfile Current()
        {
            return ((UserProfile)(HttpContext.Current.Profile));
        }
  <!-- Profile configuration -->
    <profile enabled="true" defaultProvider="EFProfileProvider" inherits="Jan.DB.Provider.UserProfile" automaticSaveEnabled="true">
      <providers>
        <clear/>
        <add name="EFProfileProvider" type="Jan.DB.Provider.EFProfileProvider" connectionStringName="JanEntities" applicationName=""/>
      </providers>
    </profile>
Chitta
  • 185
  • 2
  • 15

1 Answers1

0

While migrating from simple membership to Identity we had made some mistake. Although we have removed all the membership related codes. One thing we have done is how profile is handled. I mean in idenity customization we have used the old UserProfile.cs of membership with some customization. But as we are using in web.config so at runtime Asp.net memebrship automatically creates the ProfileCommon.cs and for that we are getting that warning. so can avoid that warning by cleaning of the customization and moved to how identity handles the profile information.

Chitta
  • 185
  • 2
  • 15