Can the App pool User name be retrieved with a web app.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • waldedg
    New Member
    • Feb 2008
    • 3

    Can the App pool User name be retrieved with a web app.

    I am writing an intranet web application and would like to retrieve the user name of the app. pool. (Not the user name of the user hitting the web app).

    Is this possible? And if so could you post the code

    I am using .net 1.x with c#.

    Thanks in advance, Doug
  • myth0s
    New Member
    • Jan 2008
    • 32

    #2
    Originally posted by waldedg
    I am writing an intranet web application and would like to retrieve the user name of the app. pool. (Not the user name of the user hitting the web app).

    Is this possible? And if so could you post the code

    I am using .net 1.x with c#.

    Thanks in advance, Doug
    "WindowsIdentit y.GetCurrent(). Name" will give you the name of the security account (AKA app. pool identity) used to run the application pool.

    Comment

    • waldedg
      New Member
      • Feb 2008
      • 3

      #3
      Originally posted by myth0s
      "WindowsIdentit y.GetCurrent(). Name" will give you the name of the security account (AKA app. pool identity) used to run the application pool.
      It appears that this is for windows forms and not Web Apps. and that this is for .NetFramework 3.5. If that is correct...do you know of anything that will work with a web App and in .NetFrameWork 1.x?

      I am building a wrapper that will be attached to both Classic asp as well as .Net 1.x and .Net 2.0 web applications.

      Thank you for your quick reply....Doug

      Comment

      • myth0s
        New Member
        • Jan 2008
        • 32

        #4
        Originally posted by waldedg
        It appears that this is for windows forms and not Web Apps. and that this is for .NetFramework 3.5. If that is correct...do you know of anything that will work with a web App and in .NetFrameWork 1.x?

        I am building a wrapper that will be attached to both Classic asp as well as .Net 1.x and .Net 2.0 web applications.

        Thank you for your quick reply....Doug
        Woops, sorry.

        You can try the server variables (http://msdn2.microsoft .com/en-us/library/ms524602.aspx). I'm not sure about the compatibility though. If this doesn't works for you, I fear that I won't be able to help you :(

        HTH

        Comment

        Working...