Board index » delphi » ASP and in-process ole automation server security

ASP and in-process ole automation server security

I like to execute my OLE automation in-process server with Administrative
access in NT4 from IIS3 (IIS2 + ASP).
Any Idea?!!

--
Ivan Borissov Kojouharov
ikojuha...@bitex.com

 

Re:ASP and in-process ole automation server security


Yes, impersonate a user with admin rights.

You'll need the user's name, domain and password, of course. Until you do,
you'll only have read-only access to part of the NT registry (not even your
local dir).

Good luck,
Stephane
----
Stephane Grobety,
Corporate:
 GIT S.A.
 EMail: Stephane.grob...@git.ch  WWW: http://www.git.ch/
private:
 EMail: Grob...@fulgan.com  WWW: http://www.fulgan.com/
-----
"The world is flat, if you see a globe, it only a rendering effect"

Quote
Ivan Borissov wrote in message <6i9vds$gb...@forums.borland.com>...
>I like to execute my OLE automation in-process server with Administrative
>access in NT4 from IIS3 (IIS2 + ASP).
>Any Idea?!!

>--
>Ivan Borissov Kojouharov
>ikojuha...@bitex.com

Re:ASP and in-process ole automation server security


OK!,
I have created an OLE Automation In-process (or Out-process) Server, which
uses the function NetUserAdd(bla-bla-bla)

=================
var err:Integer;
......
err := NetUserAdd(
                     PwideChar(MyDomainName),       //PDC name
                     1,            //level
                     @user_info,  //input buffer
                     parm_err);         //parameter in error

                     Case err of
                        NERR_Success:   UserResult:='User successfully
created.';
                        NERR_UserExists:UserResult:='User already exists.';
                        ERROR_INVALID_PARAMETER: UserResult:=
Format('Invalid Parameter Error adding user: Parameter Index = %d',
                                         [parm_err]);

                        ERROR_ACCESS_DENIED:   UserResult:='The user does
not have access to the requested information.';
                        NERR_InvalidComputer:  UserResult:='The computer
name is invalid.';
                        NERR_NotPrimary:       UserResult:='The operation is
allowed only on the primary domain controller of the domain.';
                        NERR_GroupExists:      UserResult:=' The group
already exists.';
                        NERR_PasswordTooShort: UserResult:='The password is
shorter than required.';
                     end;
======================================

When I call this Ole Automation Server with My DELPHI CLIENT ALL IS OK!!!!(I
use Admin`s Account Log On on NT)
But when I CALL THIS Ole Automation Server with ASP (ACTIVE SERVER PAGES), I
receive  ERROR_ACCESS_DENIED in My TEST PAGE!!!!!!!!!

Any IDEA AGAIN!!!????

Re:ASP and in-process ole automation server security


Quote
Ivan Borissov wrote in message <6iad06$g...@forums.borland.com>...
>OK!,
>I have created an OLE Automation In-process (or Out-process) Server, which
>uses the function NetUserAdd(bla-bla-bla)

{snip}

Quote

>When I call this Ole Automation Server with My DELPHI CLIENT ALL IS
OK!!!!(I
>use Admin`s Account Log On on NT)
>But when I CALL THIS Ole Automation Server with ASP (ACTIVE SERVER PAGES),
I
>receive  ERROR_ACCESS_DENIED in My TEST PAGE!!!!!!!!!

>Any IDEA AGAIN!!!????

Yes, this is perfectly normal: your ActiveX is running in a limited-rights
environement. To gain administrator right, you must use user impersonation.
That is made in two setps:

First, the user must log on the server. That is made using the WinNT API
LogonUser. After that, you use the API ImpersonateLoggedOnUser to use the
rights of the newly logged on user.

Good luck,
Stephane----
Stephane Grobety,
Corporate:
GIT S.A. EMail: Stephane.grob...@git.ch  WWW: http://www.git.ch/
private:
EMail: Grob...@fulgan.com  WWW: http://www.fulgan.com
-----
"The world is flat, if you see a globe, it only a rendering effect"

Re:ASP and in-process ole automation server security


Thanks! I whill try on.

Ivan Borissov Kojouharov
ikojuha...@bitex.com

Other Threads