Problem creating ProfileCommon

0

Ihavethefollowingproblemwhencreatingmyprofile,cananyonehelpmewithwhatmaybehappening?

MywebConfigisconfiguredasfollows.

<profiledefaultProvider="AspNetSqlProfileProvider">
  <providers>
    <clear />
    <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" applicationName="/Usuarios" connectionStringName="labPuc" />
  </providers>
  <properties>
    <add name="UserId" type="System.Guid" />
    <add name="Nome" type="System.String" />
    <add name="TipoPermissao" type="System.String" />
    <add name="Email" type="System.String" />
    <add name="Habilitado" type="System.String" />
  </properties>
</profile>
    
asked by anonymous 21.09.2014 / 00:58

1 answer

1

This code would never work. Here you override perfil mounted via Linq:

perfil = (ProfileCommon) Create(userName, true);

The right thing would be to keep the Linq sentence alone. This line I highlighted can be removed.

    
21.09.2014 / 01:08