Re: system.diagnostic.process Error Output

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Paul Bergson (pbergson_at_mnpower.com)
Date: 02/09/05


Date: Wed, 9 Feb 2005 08:38:38 -0600

I thought about this and decided to make the network service a local admin
and pointed the xcacls at a local file. That worked.

So...................

How can I get a spawned process to impersonate an id. Is this what you sent
me last time and I haven't installed it properly?

Here is what I have in my web.config that resides at the root of my web
site. filerAdmin is a domain account that has full rights on a Linux Box (A
NetApps Filer if you are familiar with them).

<configuration>

            <system.web>

                        <authentication mode="Windows" />

                        <identity impersonate="true"
userName="gob\filerAdmin" password="xxxxxxxx"/>

            </system.web>

</configuration>

-- 
Paul Bergson
"Steve C. Orr [MVP, MCSD]" <Steve@Orr.net> wrote in message
news:O1rGscjDFHA.1936@TK2MSFTNGP14.phx.gbl...
> Oh, you must be running Windows 2003.  Network Service is the default
> account that is used and it is not an Administrator level account by
default
> and probably doesn't have permission to access the file.
> It sounds like it's working with impersonation as long as you pass it the
> parameters it expects, so what is the problem?
>
> -- 
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
>
> "Paul Bergson" <pbergson@mnpower.com> wrote in message
> news:uTIeUVjDFHA.1264@TK2MSFTNGP12.phx.gbl...
> > Not sure who the user is, think it is admin from my server settings.
When
> > I
> > run task manager I see the process fire and the user name is "Network
> > Service."  This is even if I use the account impersonation.  I get the
> > same
> > thing happening either way.
> >
> > If I don't pass any arguments the job shows up on the task manager and
> > just
> > sits there until I kill it.  If I pass it arguments then the job acts
like
> > it runs but the job doesn't show up in the task manager.  But the job
> > hangs
> > in a dos command if no arguments are supplied, so I'm assuming the job
> > thread is trying to tell me it needs data and then is waiting for a
> > response
> > to the error.  But I don't know if that is why.
> >
> > Is there any way I can see what is happening on this thread for output?
> >
> > -- 
> >
> > Paul Bergson
> >
> > "Steve C. Orr [MVP, MCSD]" <Steve@Orr.net> wrote in message
> > news:uUCY8YiDFHA.1040@TK2MSFTNGP09.phx.gbl...
> >> It's most likely a security-related problem.
> >> To test this theory you can try having it run under your personal user
> >> account via impersonation.
> >> Here's more info:
> >>
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconaspnetimpersonation.asp
> >>
> >> -- 
> >> I hope this helps,
> >> Steve C. Orr, MCSD, MVP
> >> http://SteveOrr.net
> >>
> >>
> >> "Paul Bergson" <pbergson@mnpower.com> wrote in message
> >> news:eRngxTiDFHA.1564@TK2MSFTNGP09.phx.gbl...
> >> >I have been trying to get a process to start up and run with arguments
> >> > passed to it.  I have gotten close (Thanks to help from this board)
but
> > I
> >> > there is a failure while I'm running this because the c:\bin\xcacls
> > starts
> >> > nothing happens.
> >> >
> >> > How can I see output from the console i was trying to get the
> >> > ProcessStartInfo.RedirectStandardOutput Property to work but even if
I
> > got
> >> > the system to process it I didn;t know where the output was being
sent.
> >> > I'm
> >> > in over my head but hoping to try and get this to run.
> >> >
> >> > Anybody know what I can do to get this to give me the output?
> >> >
> >> >
> >> > <%@ Page Language="vbscript" Debug="true" %>
> >> >
> >> >
> >> > <script runat="server">
> >> > Sub submit(sender As Object, e As EventArgs)
> >> >
> >> >  Dim csc As System.Diagnostics.Process = New
> > System.Diagnostics.Process()
> >> >  csc.StartInfo.FileName = "c:\bin\xcacls"
> >> >  csc.StartInfo.Arguments = "c:\blaster /G GOB\pbergson:F /Y"
> >> >  csc.Start()
> >> >
> >> > End Sub
> >> > </script>
> >> >
> >> > <html>
> >> >  <body>
> >> >    <form runat="server">
> >> >      <asp:Button OnClick="submit" Text="Submit" runat="server" />
> >> >      <p><asp:Label id="lbl1" runat="server" /></p>
> >> >    </form>
> >> >  </body>
> >> > </html>
> >> >
> >> > Thank-You
> >> >
> >> > -- 
> >> >
> >> > Paul Bergson
> >> >
> >> >
> >>
> >>
> >
> >
>
>


Relevant Pages

  • Re: system.diagnostic.process Error Output
    ... account via impersonation. ... "Paul Bergson" wrote in message ... > Sub submit ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SetPassword access denied
    ... safely invoke SetPassword etc..... ... impersonation or using the process token without impersonation) is NOT ... account that is used for performing remote activities in the directory. ... Co-author of "The .NET Developer's Guide to Directory Services ...
    (microsoft.public.windows.server.active_directory)
  • Re: VS.NET 2005 and the "allowDefinition=MachineToApplication" error
    ... Your description of impersonation is great. ... If you want to use the default configured account, eliminate that entry, or configure it as: ... The easiest way to assign correct permissions to all required directories is to run: ... I re-started IIS and tried to access my ASPX page again -- same ...
    (microsoft.public.dotnet.framework.aspnet)
  • [Full-disclosure] Maybe nothing so shady; depends on the motive.
    ... There may be no impersonation going on. ... attempted use of a disabled account would produce messages about "account foo login fail" ... SecureWorks was still reading email addressed to David Maynor. ...
    (Full-Disclosure)
  • Re: SetPassword access denied
    ... That said, I think one thing worth pointing out is that in both cases here, your code is supplying credentials to the DirectoryEntry constructor. ... the identity of the current thread (established either via impersonation or using the process token without impersonation) is NOT the account that is used for performing remote activities in the directory. ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)