nt3.6 使用DiscuzToolkit 同步登錄出錯(同步注冊功能可以正常使用)
本地測驗
主站呼叫報錯: 反射型別“Discuz.Toolkit.UserInfoResponse”時出錯。
主站呼叫代碼:
var txtUserName = TbAccount.Text;
var txtPassword = TbPassword.Text;
DiscuzSession ds = WebSampleHelper.DiscuzSessionHelper.GetSession();
int uid = ds.GetUserID(txtUserName);
ds.Login(uid, txtPassword, false, 100, "");
UserInfoResponse物件
[XmlRoot("users_getInfo_response", Namespace = "http://nt.discuz.net/api/", IsNullable = false)]
public class UserInfoResponse
{
[XmlElement("user")]
public User[] user_array;
[XmlIgnore]
public User[] Users
{
get { return user_array ?? new User[0]; }
}
[XmlAttribute("list")]
public bool List;
}
使用DiscuzToolkit原始碼測驗時,就沒有報錯。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/68092.html
標籤:ASP.NET
