Re: Yet another permissions thing
From: Trevor Lawrence (TrevorL@ise.canberra.edu.au)
Date: 11/06/02
- Next message: Trevor Lawrence: "Re: Enabling account through .Net"
- Previous message: Abel Banda: "Enabling account through .Net"
- In reply to: Willy Denoyette [MVP]: "Re: Yet another permissions thing"
- Next in thread: Willy Denoyette [MVP]: "Re: Yet another permissions thing"
- Reply: Willy Denoyette [MVP]: "Re: Yet another permissions thing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Trevor Lawrence" <TrevorL@ise.canberra.edu.au> Date: Thu, 7 Nov 2002 08:12:13 +1100
Thanks. Sounds a likely explanation, since the COM DLL was originally built
in VB6. I can replace the COM object and rewrite the stuff directly as a
VB.NET class (with some difficulty), but it will end up making direct Win32
calls. How is a P/Invoke call to a Win32 API affected by threading issues?
The alternative is to use .NET WMI mechanisms to achieve the same result.
Still plenty of work, but still....
Trevor
"Willy Denoyette [MVP]" <willy.denoyette@pandora.be> wrote in message
news:eBKt3HZhCHA.3708@tkmsftngp08...
> You are mixing two technologies here - .NET and COM, however, this has
some security implications.
> Your COM component is probably a Single Threaded type, when created from a
Multithreaded environment like ASP.NET, your component
> will be created on a COM managed STA thread, the result is that the
component runs in the process security context (aspnet?) not the
> impersonating threads context.
>
> What you could do is create a new (STA) thread and transfer the
impersonation token to the newly created thread before creating the
> COM object.
>
> Willy.
>
> "Trevor Lawrence" <TrevorL@ise.canberra.edu.au> wrote in message
news:udemrMHhCHA.1652@tkmsftngp09...
> > I have an ASP.NET app that is required, amongst other things, to create
a
> > folder on another server (i.e. via a UNC path), and then set permissions
on
> > that folder.
> >
> > I have the ASP.NET app impersonating an account with permissions to
create
> > the folder and Directory.CreateDirectory works fine. To set the
security I
> > have a small COM DLL that I have used for a few years successfully for
this
> > sort of purpose in other software. However when I call the AddACE
method in
> > this DLL from the aspx page I get an Access Denied error. I can't see
why.
> > It is as if the impersonation that should be applying to the whole aspx
page
> > execution is not applying when I call a method in a COM DLL. That seems
> > odd. There is no COM+ configuration set up for this COM object. The
AddACE
> > method is being called immediately after the successful create directory
> > function.
> >
> > And yes the inherited permissions on the newly created folder DO allow
the
> > user in question to set permissions on the folder.
> >
> > Any clues?
> >
> > Trevor Lawrence
> > University of Canberra
> >
> >
>
>
- Next message: Trevor Lawrence: "Re: Enabling account through .Net"
- Previous message: Abel Banda: "Enabling account through .Net"
- In reply to: Willy Denoyette [MVP]: "Re: Yet another permissions thing"
- Next in thread: Willy Denoyette [MVP]: "Re: Yet another permissions thing"
- Reply: Willy Denoyette [MVP]: "Re: Yet another permissions thing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|