Re: NetGroupGetUsers() occasional failures

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Eugene Gershnik" wrote
> Dave Lowther wrote:
>> My code has the domain controller name in the 1st param and works fine
>> except on my PC where it fails once every 12 mins 20 secs. I'm
>> calling the API once every 10 seconds, so it works 73 times, then
>> fails once, then works 73 times etc.
>
> Even if the code worked perfectly this kind of polling is a bad idea. Do
> you really expect groups to change so often?

No.

This isn't released code, I've not decided what the real polling rate will
be.

Is there a way to register with the DC to be sent an event driven message
when group membership changes ?

> Enumerating groups is an expensive operation (especially on large domains)
> both in terms of server CPU time and in network traffic.

Yes, I've come to realise that whilst looking at the amount of network
traffic
and the elapsed time taken to complete the dialogue with the DC.

> Doing it very often (and I guess you will also do it from multiple
> machines)
> puts unnecessary strain on your DC and network.

It won't be done from multiple machines, the application is a server and
there will, in almost all cases, only be one on a domain.

The server administrator will be able to allow / deny clients access to some
application specific resources, using a combination of client PC name,
client user name and client group membership.

I didn't want to slow down the server response to the client by talking to
the
DC when the client connects so I cache the group membership information
locally.

> Also remember that all Net APIs are remote RPC calls. As such you must
> *expect* them to fall occasionally.

Point taken.

> I am not saying that the symptoms you are seeing are not a result of some
> faulty software on your box but even if so it doesn't really matter.

At the moment I want to understand why it's happening to determine if
its a problem with my code or not. Like you say, my code needs to be
able to cope with occasional failures, and it does. I only know about the
failures because they get written to a log, it doesn't affect the behaviour
of the server.

Thanks again for the comments.

Dave.


.



Relevant Pages

  • Re: Wierd SBS2003 SP1 printer install doozie
    ... connect to the internet thingy a numbr of times. ... it tries for a second then fails. ... On my own client PC (XP Pro ... > devices when run from the server, but works fine on my client PC. ...
    (microsoft.public.windows.server.sbs)
  • Wierd SBS2003 SP1 printer install doozie
    ... it tries for a second then fails. ... On my own client PC (XP Pro ... devices when run from the server, but works fine on my client PC. ... Windows IP Configuration ...
    (microsoft.public.windows.server.sbs)
  • Re: odd socket behavior with ZoneAlarm
    ... > Using readfails and using recvor sysreadsucceeds. ... if the server is altered so that it does not send $EOL at the ... then I still find no problem with the client script. ... be inconsistent with your speculation. ...
    (comp.lang.perl.misc)
  • Re: Multiple DNS servers load balancing
    ... It try the first one until it fails to ... > server will be the first to respond & only if the primary fails the ... >> The client resolvers are supposed to balance this for you. ... >> dns server ip in the client list will be tried and the RTT (round trip ...
    (microsoft.public.windows.server.dns)
  • Re: What doesnt lend itself to OO?
    ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
    (comp.object)