Start external Process under different user account in ASP.NET???

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Start external Process under different user account in ASP.NET???

    Does anyone know how to get Process.Start() to use the security context of
    the user that my ASP.NET app is impersonating? It seems that it is always
    run as the ASPNET User no matter what I do.

    I know that I can look into CreateProcessWithLogonW, but I really do not
    want to ask and store a users password.

    Anyone have any thoughts?

    Thanks
    Shawn


    Shawn Anderson Guest

  2. Similar Questions and Discussions

    1. Worker Process Account for ASP.NET
      Hi, I am trying to figure out the default Worker Process Account for ASP.NET Worker Process. Following is my list - IIS 5.0 on Windows 2000 ...
    2. start process as impersonated account for NETSH DHCP?
      Am trying to automatically query and update DHCP servers via a web application with VB.NET. Testing with a privileged account, defined thus in...
    3. Process.Start in a web service
      When an ASP.NET app calls Process.Start(), is the resulting process run under the same user as the ASP.NET app? My situation is an ASP.NET app...
    4. Start external process from ASP.Net
      Hello: I am currently having problems with an ASP.NET page...I've never programmed in ASP or HTML so all of this is new to me. I have a table that...
    5. Old Windows user account VS New windows user account ROUND 1
      Larissa; Her name is listed because her name was used when the profile was created. Create a new profile and copy the data to the new profile:...
  3. #2

    Default Re: Start external Process under different user account in ASP.NET???

    you should use CreateProcessWithTokenW. you will have use DuplicateToken to
    get a primary token necessary for the call.

    -- bruce (sqlwork.com)



    "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    news:O6kE4jOaEHA.2056@TK2MSFTNGP12.phx.gbl...
    > Does anyone know how to get Process.Start() to use the security context of
    > the user that my ASP.NET app is impersonating? It seems that it is always
    > run as the ASPNET User no matter what I do.
    >
    > I know that I can look into CreateProcessWithLogonW, but I really do not
    > want to ask and store a users password.
    >
    > Anyone have any thoughts?
    >
    > Thanks
    > Shawn
    >
    >

    bruce barker Guest

  4. #3

    Default Re: Start external Process under different user account in ASP.NET???

    Excellent Idea -- only one major problem: It only works on Windows 2003.

    Any other thoughts that will work on atleast Windows 2000?

    Shawn

    "bruce barker" <nospam_brubar@safeco.com> wrote in message
    news:e9xFeFPaEHA.1244@TK2MSFTNGP10.phx.gbl...
    > you should use CreateProcessWithTokenW. you will have use DuplicateToken
    > to
    > get a primary token necessary for the call.
    >
    > -- bruce (sqlwork.com)
    >
    >
    >
    > "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    > news:O6kE4jOaEHA.2056@TK2MSFTNGP12.phx.gbl...
    >> Does anyone know how to get Process.Start() to use the security context
    >> of
    >> the user that my ASP.NET app is impersonating? It seems that it is
    >> always
    >> run as the ASPNET User no matter what I do.
    >>
    >> I know that I can look into CreateProcessWithLogonW, but I really do not
    >> want to ask and store a users password.
    >>
    >> Anyone have any thoughts?
    >>
    >> Thanks
    >> Shawn
    >>
    >>
    >
    >

    Shawn Anderson Guest

  5. #4

    Default Re: Start external Process under different user account in ASP.NET???

    For one thing, you need a primary token to create a process, but to get a
    primary token, you need a plain text password.

    In a separate thread, we were just discussing getting our the Win2K security
    issue by calling the runas service, but that still requires a plain text
    password.

    Can you get around asking for the pwd from the user? Maybe you could switch
    to Basic authentication and SSL so that you would have it.

    Joe K.

    "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    news:uO%23%23bVPaEHA.2812@TK2MSFTNGP11.phx.gbl...
    > Excellent Idea -- only one major problem: It only works on Windows 2003.
    >
    > Any other thoughts that will work on atleast Windows 2000?
    >
    > Shawn
    >
    > "bruce barker" <nospam_brubar@safeco.com> wrote in message
    > news:e9xFeFPaEHA.1244@TK2MSFTNGP10.phx.gbl...
    > > you should use CreateProcessWithTokenW. you will have use DuplicateToken
    > > to
    > > get a primary token necessary for the call.
    > >
    > > -- bruce (sqlwork.com)
    > >
    > >
    > >
    > > "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    > > news:O6kE4jOaEHA.2056@TK2MSFTNGP12.phx.gbl...
    > >> Does anyone know how to get Process.Start() to use the security context
    > >> of
    > >> the user that my ASP.NET app is impersonating? It seems that it is
    > >> always
    > >> run as the ASPNET User no matter what I do.
    > >>
    > >> I know that I can look into CreateProcessWithLogonW, but I really do
    not
    > >> want to ask and store a users password.
    > >>
    > >> Anyone have any thoughts?
    > >>
    > >> Thanks
    > >> Shawn
    > >>
    > >>
    > >
    > >
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  6. #5

    Default Re: Start external Process under different user account in ASP.NET???

    Unfortunately it is a requirement to have "pass-through" authentication.
    Asking for the password breaks that.


    "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    in message news:%23rLyrZPaEHA.3112@TK2MSFTNGP09.phx.gbl...
    > For one thing, you need a primary token to create a process, but to get a
    > primary token, you need a plain text password.
    >
    > In a separate thread, we were just discussing getting our the Win2K
    > security
    > issue by calling the runas service, but that still requires a plain text
    > password.
    >
    > Can you get around asking for the pwd from the user? Maybe you could
    > switch
    > to Basic authentication and SSL so that you would have it.
    >
    > Joe K.
    >
    > "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    > news:uO%23%23bVPaEHA.2812@TK2MSFTNGP11.phx.gbl...
    >> Excellent Idea -- only one major problem: It only works on Windows 2003.
    >>
    >> Any other thoughts that will work on atleast Windows 2000?
    >>
    >> Shawn
    >>
    >> "bruce barker" <nospam_brubar@safeco.com> wrote in message
    >> news:e9xFeFPaEHA.1244@TK2MSFTNGP10.phx.gbl...
    >> > you should use CreateProcessWithTokenW. you will have use
    >> > DuplicateToken
    >> > to
    >> > get a primary token necessary for the call.
    >> >
    >> > -- bruce (sqlwork.com)
    >> >
    >> >
    >> >
    >> > "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    >> > news:O6kE4jOaEHA.2056@TK2MSFTNGP12.phx.gbl...
    >> >> Does anyone know how to get Process.Start() to use the security
    >> >> context
    >> >> of
    >> >> the user that my ASP.NET app is impersonating? It seems that it is
    >> >> always
    >> >> run as the ASPNET User no matter what I do.
    >> >>
    >> >> I know that I can look into CreateProcessWithLogonW, but I really do
    > not
    >> >> want to ask and store a users password.
    >> >>
    >> >> Anyone have any thoughts?
    >> >>
    >> >> Thanks
    >> >> Shawn
    >> >>
    >> >>
    >> >
    >> >
    >>
    >>
    >
    >

    Shawn Anderson Guest

  7. #6

    Default Re: Start external Process under different user account in ASP.NET

    Shawn see my thread Access File Share from ASP.NET using Unmanaged Code which may solve your problem but of course I have found that has issues as well which is obviously the reason for my post.

    "Shawn Anderson" wrote:
    > Unfortunately it is a requirement to have "pass-through" authentication.
    > Asking for the password breaks that.
    >
    >
    > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    > in message news:%23rLyrZPaEHA.3112@TK2MSFTNGP09.phx.gbl...
    > > For one thing, you need a primary token to create a process, but to get a
    > > primary token, you need a plain text password.
    > >
    > > In a separate thread, we were just discussing getting our the Win2K
    > > security
    > > issue by calling the runas service, but that still requires a plain text
    > > password.
    > >
    > > Can you get around asking for the pwd from the user? Maybe you could
    > > switch
    > > to Basic authentication and SSL so that you would have it.
    > >
    > > Joe K.
    > >
    > > "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    > > news:uO%23%23bVPaEHA.2812@TK2MSFTNGP11.phx.gbl...
    > >> Excellent Idea -- only one major problem: It only works on Windows 2003.
    > >>
    > >> Any other thoughts that will work on atleast Windows 2000?
    > >>
    > >> Shawn
    > >>
    > >> "bruce barker" <nospam_brubar@safeco.com> wrote in message
    > >> news:e9xFeFPaEHA.1244@TK2MSFTNGP10.phx.gbl...
    > >> > you should use CreateProcessWithTokenW. you will have use
    > >> > DuplicateToken
    > >> > to
    > >> > get a primary token necessary for the call.
    > >> >
    > >> > -- bruce (sqlwork.com)
    > >> >
    > >> >
    > >> >
    > >> > "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    > >> > news:O6kE4jOaEHA.2056@TK2MSFTNGP12.phx.gbl...
    > >> >> Does anyone know how to get Process.Start() to use the security
    > >> >> context
    > >> >> of
    > >> >> the user that my ASP.NET app is impersonating? It seems that it is
    > >> >> always
    > >> >> run as the ASPNET User no matter what I do.
    > >> >>
    > >> >> I know that I can look into CreateProcessWithLogonW, but I really do
    > > not
    > >> >> want to ask and store a users password.
    > >> >>
    > >> >> Anyone have any thoughts?
    > >> >>
    > >> >> Thanks
    > >> >> Shawn
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>
    > >
    > >
    >
    >
    >
    Mark Duregon Guest

  8. #7

    Default Re: Start external Process under different user account in ASP.NET

    And where might I find this thread? :)

    Shawn
    "Mark Duregon" <msdnonline@aspect.com.au> wrote in message
    news:6F09B214-E621-44F9-BB19-9CF0A066B97B@microsoft.com...
    > Shawn see my thread Access File Share from ASP.NET using Unmanaged Code
    > which may solve your problem but of course I have found that has issues as
    > well which is obviously the reason for my post.
    >
    > "Shawn Anderson" wrote:
    >
    >> Unfortunately it is a requirement to have "pass-through" authentication.
    >> Asking for the password breaks that.
    >>
    >>
    >> "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>
    >> wrote
    >> in message news:%23rLyrZPaEHA.3112@TK2MSFTNGP09.phx.gbl...
    >> > For one thing, you need a primary token to create a process, but to get
    >> > a
    >> > primary token, you need a plain text password.
    >> >
    >> > In a separate thread, we were just discussing getting our the Win2K
    >> > security
    >> > issue by calling the runas service, but that still requires a plain
    >> > text
    >> > password.
    >> >
    >> > Can you get around asking for the pwd from the user? Maybe you could
    >> > switch
    >> > to Basic authentication and SSL so that you would have it.
    >> >
    >> > Joe K.
    >> >
    >> > "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    >> > news:uO%23%23bVPaEHA.2812@TK2MSFTNGP11.phx.gbl...
    >> >> Excellent Idea -- only one major problem: It only works on Windows
    >> >> 2003.
    >> >>
    >> >> Any other thoughts that will work on atleast Windows 2000?
    >> >>
    >> >> Shawn
    >> >>
    >> >> "bruce barker" <nospam_brubar@safeco.com> wrote in message
    >> >> news:e9xFeFPaEHA.1244@TK2MSFTNGP10.phx.gbl...
    >> >> > you should use CreateProcessWithTokenW. you will have use
    >> >> > DuplicateToken
    >> >> > to
    >> >> > get a primary token necessary for the call.
    >> >> >
    >> >> > -- bruce (sqlwork.com)
    >> >> >
    >> >> >
    >> >> >
    >> >> > "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    >> >> > news:O6kE4jOaEHA.2056@TK2MSFTNGP12.phx.gbl...
    >> >> >> Does anyone know how to get Process.Start() to use the security
    >> >> >> context
    >> >> >> of
    >> >> >> the user that my ASP.NET app is impersonating? It seems that it is
    >> >> >> always
    >> >> >> run as the ASPNET User no matter what I do.
    >> >> >>
    >> >> >> I know that I can look into CreateProcessWithLogonW, but I really
    >> >> >> do
    >> > not
    >> >> >> want to ask and store a users password.
    >> >> >>
    >> >> >> Anyone have any thoughts?
    >> >> >>
    >> >> >> Thanks
    >> >> >> Shawn
    >> >> >>
    >> >> >>
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >
    >>
    >>
    >>

    Shawn Anderson Guest

  9. #8

    Default Re: Start external Process under different user account in ASP.NET

    in this news group I posted it about and hour ago.

    "Shawn Anderson" wrote:
    > And where might I find this thread? :)
    >
    > Shawn
    > "Mark Duregon" <msdnonline@aspect.com.au> wrote in message
    > news:6F09B214-E621-44F9-BB19-9CF0A066B97B@microsoft.com...
    > > Shawn see my thread Access File Share from ASP.NET using Unmanaged Code
    > > which may solve your problem but of course I have found that has issues as
    > > well which is obviously the reason for my post.
    > >
    > > "Shawn Anderson" wrote:
    > >
    > >> Unfortunately it is a requirement to have "pass-through" authentication.
    > >> Asking for the password breaks that.
    > >>
    > >>
    > >> "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>
    > >> wrote
    > >> in message news:%23rLyrZPaEHA.3112@TK2MSFTNGP09.phx.gbl...
    > >> > For one thing, you need a primary token to create a process, but to get
    > >> > a
    > >> > primary token, you need a plain text password.
    > >> >
    > >> > In a separate thread, we were just discussing getting our the Win2K
    > >> > security
    > >> > issue by calling the runas service, but that still requires a plain
    > >> > text
    > >> > password.
    > >> >
    > >> > Can you get around asking for the pwd from the user? Maybe you could
    > >> > switch
    > >> > to Basic authentication and SSL so that you would have it.
    > >> >
    > >> > Joe K.
    > >> >
    > >> > "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    > >> > news:uO%23%23bVPaEHA.2812@TK2MSFTNGP11.phx.gbl...
    > >> >> Excellent Idea -- only one major problem: It only works on Windows
    > >> >> 2003.
    > >> >>
    > >> >> Any other thoughts that will work on atleast Windows 2000?
    > >> >>
    > >> >> Shawn
    > >> >>
    > >> >> "bruce barker" <nospam_brubar@safeco.com> wrote in message
    > >> >> news:e9xFeFPaEHA.1244@TK2MSFTNGP10.phx.gbl...
    > >> >> > you should use CreateProcessWithTokenW. you will have use
    > >> >> > DuplicateToken
    > >> >> > to
    > >> >> > get a primary token necessary for the call.
    > >> >> >
    > >> >> > -- bruce (sqlwork.com)
    > >> >> >
    > >> >> >
    > >> >> >
    > >> >> > "Shawn Anderson" <sanderson@eye-catcher.com> wrote in message
    > >> >> > news:O6kE4jOaEHA.2056@TK2MSFTNGP12.phx.gbl...
    > >> >> >> Does anyone know how to get Process.Start() to use the security
    > >> >> >> context
    > >> >> >> of
    > >> >> >> the user that my ASP.NET app is impersonating? It seems that it is
    > >> >> >> always
    > >> >> >> run as the ASPNET User no matter what I do.
    > >> >> >>
    > >> >> >> I know that I can look into CreateProcessWithLogonW, but I really
    > >> >> >> do
    > >> > not
    > >> >> >> want to ask and store a users password.
    > >> >> >>
    > >> >> >> Anyone have any thoughts?
    > >> >> >>
    > >> >> >> Thanks
    > >> >> >> Shawn
    > >> >> >>
    > >> >> >>
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>
    > >>
    >
    >
    >
    Mark Duregon Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139