![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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. |
#3
| |||
| |||
|
|
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 (AT) discussions (DOT) microsoft.com> wrote in message news:62975E60-D783-49B8-93E3-69BEA3D63520 (AT) microsoft (DOT) com... 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. |
#4
| |||
| |||
|
|
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 (AT) discussions (DOT) microsoft.com> wrote in message news:62975E60-D783-49B8-93E3-69BEA3D63520 (AT) microsoft (DOT) com... 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. |
#5
| |||
| |||
|
|
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 (AT) discussions (DOT) microsoft.com> wrote in message news:62975E60-D783-49B8-93E3-69BEA3D63520 (AT) microsoft (DOT) com... 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. |
#6
| |||
| |||
|
|
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 (AT) discussions (DOT) microsoft.com> wrote in message news:CEF949AC-8BA4-42E4-AB70-C7DBA6258496 (AT) microsoft (DOT) com... 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 (AT) discussions (DOT) microsoft.com> wrote in message news:62975E60-D783-49B8-93E3-69BEA3D63520 (AT) microsoft (DOT) com... 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. |
#7
| |||
| |||
|
|
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 (AT) discussions (DOT) microsoft.com> wrote in message news:CEF949AC-8BA4-42E4-AB70-C7DBA6258496 (AT) microsoft (DOT) com... 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 (AT) discussions (DOT) microsoft.com> wrote in message news:62975E60-D783-49B8-93E3-69BEA3D63520 (AT) microsoft (DOT) com... 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. |
#8
| |||
| |||
|
|
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 (AT) discussions (DOT) microsoft.com> wrote in message news:CEF949AC-8BA4-42E4-AB70-C7DBA6258496 (AT) microsoft (DOT) com... 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 (AT) discussions (DOT) microsoft.com> wrote in message news:62975E60-D783-49B8-93E3-69BEA3D63520 (AT) microsoft (DOT) com... 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. |
#9
| |||
| |||
|
|
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 (AT) discussions (DOT) microsoft.com> wrote in message news:EA3F321D-88AF-4F43-A245-FF3A3A41C800 (AT) microsoft (DOT) com... 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 (AT) discussions (DOT) microsoft.com> wrote in message news:CEF949AC-8BA4-42E4-AB70-C7DBA6258496 (AT) microsoft (DOT) com... 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 (AT) discussions (DOT) microsoft.com> wrote in message news:62975E60-D783-49B8-93E3-69BEA3D63520 (AT) microsoft (DOT) com... 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. |
#10
| |||
| |||
|
|
Thank you Joe. So, there is probablly some differences between my development PC and the VM pc. Even though I can confirm that both are win2k server with sp4 and .net 2.0. It's strange that it would work on my PC but not the vm. However, the fix per your suggestion did fix the problem. Thank you very much. -- Thanks. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |