Not able to access profile

S

shapper

Hello,

On my MVC project I am using Membership and Profile. I added the
following on my Web.Config:

<profile enabled="true">
<properties>
<add name="Company"/>
</properties>
</profile>

On my account controller I tried to use:

Profile.Company = "My Company";

And I get the error:

The name 'Profile' does not exist in the current context

I also tried:

ProfileCommon pc = Profile.GetProfile(myuser.UserName);

And I get the error:

The type or namespace name 'ProfileCommon' could not be found (are you
missing a using directive or an assembly reference?

I tried everything I could think of but I am not able to access
profile.

Is this a problem with MVC, my project, or something else? What am I
missing?

Thanks,

Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top