I have developed a MMC property page extension snapin extending the ARS console using .NET. Everything is fine when the property page is opened for the first time. However, an exception "The parameter is incorrect" is thrown when the page is opened for the second time and so on.
DirectoryEntry de = new DirectoryEntry(edmsPath); // any EDMS path
de.RefreshCache(); // exception here, even the edmsPath is different with the first time
Later I found that the problem can be fixed by a manual Dispose() for each DirectoryEntry created after the property page is closed. There is no such problem when i do similar things directly to AD using LDAP.
Why are the exceptions thrown? How EDMS handle those binding underlying that leads to the above behaviour?
--
Regards,
Tony
DirectoryEntry de = new DirectoryEntry(edmsPath); // any EDMS path
de.RefreshCache(); // exception here, even the edmsPath is different with the first time
Later I found that the problem can be fixed by a manual Dispose() for each DirectoryEntry created after the property page is closed. There is no such problem when i do similar things directly to AD using LDAP.
Why are the exceptions thrown? How EDMS handle those binding underlying that leads to the above behaviour?
--
Regards,
Tony