How to get logged in user from another app?

Discussion in 'ASP .Net' started by John Dalberg, Apr 17, 2005.

  1. John Dalberg

    John Dalberg Guest

    I have an Intranet asp.net application that opens multiple frames in its
    main page. Authentication to the Intranet app is forms based. The app is
    third party closed source. One of the frames can display other apps which I
    develop. What I want to do is I don't want any user access my apps from
    outside the Intranet and I want to be able from inside my app to find out
    who is the current user.

    I can get the Intranet use sql server as a state server and it can save the
    current user in a database. However in *my* application, how can I
    determine the current Intranet user for the client that sent a request to
    access my app? It seems the solution is simple and out there but I can't
    get my hands on it.

    Is there a way to have my apps and the Intranet app share the same session
    without me having the source code for the Intranet app?

    TIA.

    --

    John Dalberg
     
    John Dalberg, Apr 17, 2005
    #1
    1. Advertising

  2. John Dalberg

    Elton Wang Guest

    Hi John,

    For Intranet, If you use windows authentication and deny
    anonymous access:
    <authentication mode="Windows"/>
    <authorization>
    <deny users="?" /> <!-- deny anonymous -->
    <allow users="*" /> <!-- Allow all users -->
    </authorization>

    You can use

    Page.User.Identity.Name
    Page.User.IsInRole

    to find out authentication user and determine user's role
    without user logging in process.

    HTH

    Elton Wang



    >-----Original Message-----
    >
    >
    >I have an Intranet asp.net application that opens

    multiple frames in its
    >main page. Authentication to the Intranet app is forms

    based. The app is
    >third party closed source. One of the frames can display

    other apps which I
    >develop. What I want to do is I don't want any user

    access my apps from
    >outside the Intranet and I want to be able from inside my

    app to find out
    >who is the current user.
    >
    >I can get the Intranet use sql server as a state server

    and it can save the
    >current user in a database. However in *my* application,

    how can I
    >determine the current Intranet user for the client that

    sent a request to
    >access my app? It seems the solution is simple and out

    there but I can't
    >get my hands on it.
    >
    >Is there a way to have my apps and the Intranet app share

    the same session
    >without me having the source code for the Intranet app?
    >
    >TIA.
    >
    >--
    >
    >John Dalberg
    >.
    >
     
    Elton Wang, Apr 17, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. keithb
    Replies:
    0
    Views:
    659
    keithb
    Feb 16, 2006
  2. Chumma Dede
    Replies:
    4
    Views:
    1,186
  3. Replies:
    1
    Views:
    975
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 12, 2007
  4. Imran Aziz

    Get the current logged in user name

    Imran Aziz, Aug 2, 2005, in forum: ASP .Net Security
    Replies:
    8
    Views:
    236
  5. mark

    Dispalying Welcome User to logged in user

    mark, Oct 6, 2005, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    384
Loading...

Share This Page