pusalaanita
IS-IT--Management
am geting the following exception
: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 196: internal static string GetProperty(DirectoryEntry oDE, string PropertyName)
Line 197: {
Line 198: if (oDE.Properties.Contains(PropertyName))
Line 199: {
Line 200: return oDE.Properties[PropertyName][0].ToString(); I am using this to retrieve details all users(LoadAllUsers) its works fine but when I am and retrieving a particular user details (LoadUser(UserName))it is giving the above exception.I am not able to trace out the error.I have checked with many other code samples and they r using the same.Please , help me in solving it.TksBye
: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 196: internal static string GetProperty(DirectoryEntry oDE, string PropertyName)
Line 197: {
Line 198: if (oDE.Properties.Contains(PropertyName))
Line 199: {
Line 200: return oDE.Properties[PropertyName][0].ToString(); I am using this to retrieve details all users(LoadAllUsers) its works fine but when I am and retrieving a particular user details (LoadUser(UserName))it is giving the above exception.I am not able to trace out the error.I have checked with many other code samples and they r using the same.Please , help me in solving it.TksBye