Board index » delphi » Authentication failures using DCOM

Authentication failures using DCOM

I have a remote client on a Windows 98 machine and one on a 2000 machine and
when I launch the clients I receive the following exceptions in the server:

Windows98
    EOleSysError "The Authentication Service is unknown"
Windows2000
    EOleSysError "Access is denied"

The client continues to startup on both machines and they work fine
communicating with the server but the Event notification doesn't work.  Both
of the clients receive a cookie of 0 instead of 1 and 2 respectively.  The
following code gets the ConnectionEnumerator successfully but does not step
into the while, skips right by and will not communicate the events to the
clients.

Anyone know how to help on this?

EC := GetConnectionEnumerator;
if EC <> nil then
begin
  while EC.Next(1, ConnectData, @Fetched) = S_OK do
     try
        //Do not send the message to the original client that executed the
request!
        if (ConnectData.pUnk <> nil) then
           (ConnectData.pUnk as
ILoadPlannerServerImplEvents).OnServerUpdate(InTransactionList.ToBin);
           ...

Thanks,

Drew Poggemann
poggema...@new.rr.com
(920) 205-3739

 

Re:Authentication failures using DCOM


Do you initialize the client-side security? By default, I believe callbacks
are disabled.

Quote
"John Kring" <jkr...@new.rr.com> wrote in message news:3ac0f2e9_1@dnews...
> I have a remote client on a Windows 98 machine and one on a 2000 machine
and
> when I launch the clients I receive the following exceptions in the
server:

> Windows98
>     EOleSysError "The Authentication Service is unknown"
> Windows2000
>     EOleSysError "Access is denied"

> The client continues to startup on both machines and they work fine
> communicating with the server but the Event notification doesn't work.
Both
> of the clients receive a cookie of 0 instead of 1 and 2 respectively.  The
> following code gets the ConnectionEnumerator successfully but does not
step
> into the while, skips right by and will not communicate the events to the
> clients.

> Anyone know how to help on this?

> EC := GetConnectionEnumerator;
> if EC <> nil then
> begin
>   while EC.Next(1, ConnectData, @Fetched) = S_OK do
>      try
>         //Do not send the message to the original client that executed the
> request!
>         if (ConnectData.pUnk <> nil) then
>            (ConnectData.pUnk as
> ILoadPlannerServerImplEvents).OnServerUpdate(InTransactionList.ToBin);
>            ...

> Thanks,

> Drew Poggemann
> poggema...@new.rr.com
> (920) 205-3739

Re:Authentication failures using DCOM


No I didn't.  How do you enable?

--
Drew Poggemann
poggema...@new.rr.com
(920) 205-3739

Quote
"Kristoffer Henriksson" <khenriks...@prescientsystems.com> wrote in message

news:3ac0f89d$1_1@dnews...
Quote
> Do you initialize the client-side security? By default, I believe
callbacks
> are disabled.

> "John Kring" <jkr...@new.rr.com> wrote in message news:3ac0f2e9_1@dnews...
> > I have a remote client on a Windows 98 machine and one on a 2000 machine
> and
> > when I launch the clients I receive the following exceptions in the
> server:

> > Windows98
> >     EOleSysError "The Authentication Service is unknown"
> > Windows2000
> >     EOleSysError "Access is denied"

> > The client continues to startup on both machines and they work fine
> > communicating with the server but the Event notification doesn't work.
> Both
> > of the clients receive a cookie of 0 instead of 1 and 2 respectively.
The
> > following code gets the ConnectionEnumerator successfully but does not
> step
> > into the while, skips right by and will not communicate the events to
the
> > clients.

> > Anyone know how to help on this?

> > EC := GetConnectionEnumerator;
> > if EC <> nil then
> > begin
> >   while EC.Next(1, ConnectData, @Fetched) = S_OK do
> >      try
> >         //Do not send the message to the original client that executed
the
> > request!
> >         if (ConnectData.pUnk <> nil) then
> >            (ConnectData.pUnk as
> > ILoadPlannerServerImplEvents).OnServerUpdate(InTransactionList.ToBin);
> >            ...

> > Thanks,

> > Drew Poggemann
> > poggema...@new.rr.com
> > (920) 205-3739

Re:Authentication failures using DCOM


Call CoInitializeSecurity right after after CoInitialize. My memory is a bit
shaky, so if that doesn't work, call it before CoInitialize.As an aside, I
highly recommend the book Learning DCOM, by Thuan L. Thai, put out by
O'Reilly.

Const
  RPC_C_AUTHN_LEVEL_NONE = 1;
  RPC_C_IMP_LEVEL_IDENTIFY = 2;

  OleCheck(CoInitializeSecurity(Nil, -1, Nil, Nil,
    RPC_C_AUTHN_LEVEL_NONE,  // No authentication
    RPC_C_IMP_LEVEL_IDENTIFY,  // Identify only
    Nil, EOAC_NONE, Nil));

Quote
"John Kring" <jkr...@new.rr.com> wrote in message news:3ac0fca8_1@dnews...
> No I didn't.  How do you enable?

> --
> Drew Poggemann
> poggema...@new.rr.com
> (920) 205-3739
> "Kristoffer Henriksson" <khenriks...@prescientsystems.com> wrote in
message
> news:3ac0f89d$1_1@dnews...
> > Do you initialize the client-side security? By default, I believe
> callbacks
> > are disabled.

> > "John Kring" <jkr...@new.rr.com> wrote in message

news:3ac0f2e9_1@dnews...
Quote
> > > I have a remote client on a Windows 98 machine and one on a 2000
machine
> > and
> > > when I launch the clients I receive the following exceptions in the
> > server:

> > > Windows98
> > >     EOleSysError "The Authentication Service is unknown"
> > > Windows2000
> > >     EOleSysError "Access is denied"

> > > The client continues to startup on both machines and they work fine
> > > communicating with the server but the Event notification doesn't work.
> > Both
> > > of the clients receive a cookie of 0 instead of 1 and 2 respectively.
> The
> > > following code gets the ConnectionEnumerator successfully but does not
> > step
> > > into the while, skips right by and will not communicate the events to
> the
> > > clients.

> > > Anyone know how to help on this?

> > > EC := GetConnectionEnumerator;
> > > if EC <> nil then
> > > begin
> > >   while EC.Next(1, ConnectData, @Fetched) = S_OK do
> > >      try
> > >         //Do not send the message to the original client that executed
> the
> > > request!
> > >         if (ConnectData.pUnk <> nil) then
> > >            (ConnectData.pUnk as
> > > ILoadPlannerServerImplEvents).OnServerUpdate(InTransactionList.ToBin);
> > >            ...

> > > Thanks,

> > > Drew Poggemann
> > > poggema...@new.rr.com
> > > (920) 205-3739

Other Threads