Profile in BLL
I would like to get the current user's profile at the BLL, the ASP.NET 2.0 WebSite Programming book places the BLL & DAL under the App_Code. In our solution the BLL, DAL and other layers are in different projects, but in one solution. The project outputs (dll)are builded in the web project's bin directory.
I would like to do this:
System.Web.ProfileCommon profile = (ProfileCommon)HttpContext.Current.Profile;
or
//ProfileCommon profile = HttpContext.Current.Profile as ProfileCommon;
these is my using section for the experiment:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.Security;
using System.Web.Profile;
using System.Web.Handlers;
using System.Collections;
using System.Configuration;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
The error message says:
Error 1 The type or namespace name 'ProfileCommon' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Error 2 The type or namespace name 'ProfileCommon' could not be found (are you missing a using directive or an assembly reference?)
Please try to help me with this case.
Thanks in advance!
|