更新时间:2022-10-16 12:11:07
CType does more then a static cast; you''d want something more like:
public string CN
{
get
{
return _adUser.Item["cn"].Value.ToString();
}
}
What is _adUser ? Is "cn" a valid index? If so, try changing the line:get {return (string)_adUser.Item["cn"];}
toget {return _adUser.Item["cn"].ToString();}
Late post sorry. turns out it was something in my webconfig. DOH!