Link to home
Start Free TrialLog in
Avatar of philwill4u
philwill4u

asked on

ProfileCommon could not be found - WEB SITE project

Within a WEB SITE project (not a Web Site Application) in VS2008, the following line

ProfileCommon profile = HttpContext.Current.Profile as ProfileCommon;

keeps throwing the error 'The type or namespace name 'ProfileCommon' could not be found (are you missing a using directive...'

I'm using System.Web.Profile;  in VS2008 Standard with .NET 3.5

I understand that ProfileCommon is dynamically created but how do I stop the error?

Thanks for your help.

Avatar of guru_sami
guru_sami
Flag of United States of America image

make sure you have enabled the profile in webconfig:
<profile enabled="true" defaultProvider="AspNetSqlProfileProvider">
                  <providers>
......
...
Avatar of philwill4u
philwill4u

ASKER

That's in place but still getting the same error.

I've figured it out.... and what a strange result....

in the web.config I had...

<codeSubDirectories>
   <!-- ensures that we can use both C# and VB class files int he APP_Code folder --><add directoryName="CS"/>
                  </codeSubDirectories>
ASKER CERTIFIED SOLUTION
Avatar of philwill4u
philwill4u

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Interestingly strange result...