|
Subject:
|
Profile in BLL
|
|
Posted By:
|
Faith
|
Post Date:
|
9/14/2006 3:50:23 AM
|
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!
|
|
Reply By:
|
flashster
|
Reply Date:
|
9/14/2006 4:17:39 AM
|
Try adding 'using xyz.namespace.DLL' for any code you are referencing in a particular namespace?
|
|
Reply By:
|
Faith
|
Reply Date:
|
9/14/2006 4:34:40 AM
|
How do You mean this?
I have error in this line:
ProfileCommon profile = (ProfileCommon)HttpContext.Current.Profile;
or
System.Web.ProfileCommon profile = (System.Web.ProfileCommon)HttpContext.Current.Profile;
the ProfileCommon is the unknown thing.
|
|
Reply By:
|
JoseSM
|
Reply Date:
|
8/18/2008 10:57:51 AM
|
Sorry to revive a very old topic, but I'm running into the same problem. I don't seem to be able to access the profile of any given username inside my BLL.
Does anyone have an idea. I get the same error stated as the initial posted.
|