Re: Why got error "Only one type of operation can be performed in



Yes, the issue is that you with older versions of ADSI, you can't mix
different property modification operations. For example, in ADSI there is
an add, remove, replace and clear operation. If you do an operation on the
DirectoryEntry property cache that cause more than one of those to be done
before you commit changes, it will fail.

Newer versions of ADSI allow the multiple modifications. You normally get
different versions of ADSI with different versions of Windows (including
service packs), so that's why this issue tends to vary by OS. There have
been a variety of changes to the underlying implementation between .NET 1.0,
1.1, 1.1 SP1 and .NET 2.0, so if you have different .NET versions, that
could also be at issue.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Pucca" <Pucca@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EA3F321D-88AF-4F43-A245-FF3A3A41C800@xxxxxxxxxxxxxxxx
Also, I was getting the error becuase I was committing with both "Clear"
and
"Add" method done? AD would only allow commit of one Operation at a time?
Thank you.
--
Thanks.


"Joe Kaplan" wrote:

Yeah, that looks like a multiple attribute modification type of problem.
Do
you have the full stack trace of the error message? That would be
helpful.

Is there any service pack difference between the two machines?

BTW, if you just want to overwrite an attribute value, it is much more
straightforward just to do:

entry.Properties["xxxx].Value = xxxx;

That will probably make the problem go away, even if you don't ever learn
the exact underlying cause.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services
Programming"
http://www.directoryprogramming.net
--
"Pucca" <Pucca@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CEF949AC-8BA4-42E4-AB70-C7DBA6258496@xxxxxxxxxxxxxxxx
Since there is no VS for me to debug on the VM server I put in a bunch
of
messages to see where I'm getting this error. It's apparently coming
from
my
StartCommit() method in the following code when deUGID is doing the
"Add"
method. Can you see what could possible cuase this? Again, the same
is
running just fine on my development PC.

int newUid = unifiedID + 1;
string strNewUID = newUid.ToString();
deUGID.Properties["meetingID"].Clear();
deUGID.Properties["meetingID"].Add(strNewUID);//This is the line of
code
giving error
deUGID.CommitChanges();

--
Thanks.


"Joe Kaplan" wrote:

You need to provide more detail here. Can you show an example of the
code
that produces the error, the exact error stack trace and more
information
about the differences between your development machine OS and the
deployment
server?

It could be that you have run into an ADSI limitation on Win2K server
where
multiple different types of attribute modifications are not allowed,
but
it
isn't clear if that is the problem. If that is, you need to either
write
your code differently or upgrade the server OS to a version of Windows
that
supports that ADSI feature (2K3 server).

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services
Programming"
http://www.directoryprogramming.net
--
"Pucca" <Pucca@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:62975E60-D783-49B8-93E3-69BEA3D63520@xxxxxxxxxxxxxxxx
Hi, I'm using vs2005, .net 2 for a C# windows applicaiton running on
Win2K
server. One method of this application, deletes, creates and modify
several
Directory Entry. This is running fine on my development PC. I put
this
on
another server and I would get error: "Only one type of operation
can
be
performed in a sequence"

Does anyone what could possiblly be causing this error? Thank you.
--
Thanks.








.



Relevant Pages

  • Re: ADFS System.Web.Security.SingleSignOn.WebSsoConfigurationExcep
    ... claims app doesn't overlap with the federation server ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... entered the complete URL for the web site under "Base URL". ...
    (microsoft.public.windows.server.active_directory)
  • Re: using xp credentials for ldap authentication
    ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... password into this method and have the server use that data to ... authenticate the xpuser againts active directory. ...
    (microsoft.public.windows.server.security)
  • Re: Changing ADAM user password
    ... The problem with the ADSI thing is that there is no way to formulate the ... cleartext password mods are enabled in ADAM). ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)
  • Re: using xp credentials for ldap authentication
    ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... password into this method and have the server use that data to ... You return the authentication ...
    (microsoft.public.windows.server.security)
  • Re: How to use GetObject in CShaprt
    ... I have used the codes below to insert all groups in my server into a ... >> I want to use ADSI to manage the users in my domain. ... > of directory services and ADSI. ...
    (microsoft.public.dotnet.languages.csharp)