0
I have the following problem when creating my profile, someone can help me in what may be happening?
My web Config is configured as follows.
<profile defaultProvider="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>
More when I get the profile it comes empty. Profilecommon profile = (Profilecommon)Httpcontext.Current.Profile; Alias gives the same error.
– Marconi
From what I realized my Context and my username and the other properties come empty. Does it have something to do?
– Marconi
Like I told you, you need to return one
ProfileCommon
filled with the desired properties. Either you keep Linq and return the mounted object by it, omitting the line I put in the answer, or you fill an object by Linq, call the line and change the line object with Linq’s return.– Leonel Sanches da Silva
This question deserves to be here @Gypsy? 2 years and only 25 hits!:)
– Marconi
I find the question excellent. Pity that the approach of Profiles is little explored.
– Leonel Sanches da Silva