Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 14th, 2006, 03:50 AM
Registered User
 
Join Date: Sep 2006
Location: Budapest, Hungary, Hungary.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!

  #2 (permalink)  
Old September 14th, 2006, 04:17 AM
Authorized User
 
Join Date: May 2006
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try adding 'using xyz.namespace.DLL' for any code you are referencing in a particular namespace?

  #3 (permalink)  
Old September 14th, 2006, 04:34 AM
Registered User
 
Join Date: Sep 2006
Location: Budapest, Hungary, Hungary.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.Prof ile;

the ProfileCommon is the unknown thing.

  #4 (permalink)  
Old August 18th, 2008, 10:57 AM
Registered User
 
Join Date: Aug 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with BLL and DAL kss BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 November 20th, 2008 09:23 PM
Help! BLL error. scottlucas58 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 October 8th, 2008 02:35 PM
DAL to BLL rodmcleay LINQ 3 June 2nd, 2008 12:15 PM
Using DataList with BLL DureSameen BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 January 11th, 2007 09:45 AM
Profile in BLL Faith BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 September 14th, 2006 03:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.