Re: User Class

From: Cowboy \(Gregory A. Beamer\) (N0SpamMPleezEgbworld@comcast.netN0SpamMPleezE)
Date: 10/28/02


From: "Cowboy \(Gregory A. Beamer\)" <N0SpamMPleezEgbworld@comcast.netN0SpamMPleezE>
Date: Mon, 28 Oct 2002 12:51:29 -0600


The User object is kept in your ASP.NET application. If you would like to
access it elsewhere, you will have to provide the mechanism to do this. In
general, this means passing the user object every time you hit the business
tier.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge
****************************************************************************
****
Think outside the box!
****************************************************************************
****
"John" <j@nowhere.com> wrote in message news:OdyOZbVfCHA.2516@tkmsftngp11...
> I'm new here so please forgive me if this is a stupid question.  Also, I
> searched newsgroups in Google before coming here to ask this question.
>
> I am using C# with Windows authentication.  I am able to use
> User.Identity.Name in my web form code behind pages but I am not able to
use
> this reference in other classes that I create.  I am using a structure
> similar to iBuySpy where my class modules (.cs files) are in a
subdirectory
> named "Components".  They also have a namespace that is different than the
> rest of my app.  For example my app may be a namespace of
"mycompany.myapp"
> but these components are a namespace of "mycompany.myapp.components".
Don't
> know if this makes any difference but thought I would mention it.
>
> I would like to use the User.Identity.Name and other properties in my
> classes but don't know how to reference them.  Is it possible?
>
>


Relevant Pages

  • User Class
    ... I'm new here so please forgive me if this is a stupid question. ... this reference in other classes that I create. ... For example my app may be a namespace of "mycompany.myapp" ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Separating business logic
    ... I'm attempting to separate my business logic from the presentation (i.e. ... I include a reference to the System.Data.SQLServerCE ... namespace because this particular library is going to use the database on ... I then add it to my main app in references. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Simple design question
    ... confusion, you should consider using the same namespace in both projects, ... Place the .dll file in the same bin folder as the web application .dll ... window and add the entire project as a reference. ... > I am developing an asp.net app which will be using functions which will ...
    (microsoft.public.dotnet.framework.aspnet)
  • interop question - shell
    ... Is it alright to add a reference to shell32.dll and then use the objects in ... The reason I ask, I created an app that does this, and when I transfer the ... use pinvoke interop instead of the namespace? ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Business Objects and Session Variables
    ... Addtionaly make sure it doesn't matter to your app. ... > Is it ok to store business objects to session variables or is there a ... > convenient just to call a property off of the user object. ... > to requery the database to retrieve information - is this going to kill my ...
    (microsoft.public.dotnet.framework.aspnet)