However, no more detailed descriptions were found on the web. There are many kinds of methods.
Here, I will write out this experience, I hope to be useful to you.
After reading this article
Http://www.jb51.net/article/20851.htm
And this article
Http://www.jb51.net/article/20850.htm
As described in the article above, press Discuz!nt's user's Guide to install the Forum under Windows 2003.
and to admin in, add apikey and so on.
Then use VS2008 to create a new project, adding Toolkit.dll and JSON references.
Well, if you read the above article carefully, plus, I put a little bit of code here, should be able to complete.
When registering a new user in a project, the user of the Forum is also called to register, so that it is registered synchronously. As for the deletion of the user, it seems discuz! NT does not provide API, can delete the user in the project, then directly to delete discuz! The dependencies in the NT user table.
The code (login and registration implemented) is as follows:
Copy Code code as follows:
Using System;
Using System.Collections;
Using System.Configuration;
Using System.Data;
Using System.Linq;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using System.Web.UI.HtmlControls;
Using System.Web.UI.WebControls;
Using System.Web.UI.WebControls.WebParts;
Using System.Xml.Linq;
Using Discuz.toolkit;
Namespace IntDNT3
{
public partial class _default:system.web.ui.page
{
String api_key = "c83a253f082bc671d8fbe42d485a1488";
String secret = "Bdb7378cef77149adec776b1b6e92ee8";
String url = "http://localhost/";
protected void Page_Load (object sender, EventArgs e)
{
}
protected void Btnvalidation_click (object sender, EventArgs e)
{
Discuzsession ds = new Discuzsession (Api_key, secret, URL);
Uri uri = ds. Createtoken ();
Response.Redirect (URI. ToString ());
}
protected void Btnlogin_click (object sender, EventArgs e)
{
Discuzsession ds = new Discuzsession (Api_key, secret, URL);
int uid = ds. GetUserID (Tbusername.text);
Ds. Login (UID, Tbpwd.text, False, 10, "");
}
protected void Btnregister_click (object sender, EventArgs e)
{
Discuzsession ds = new Discuzsession (Api_key, secret, URL);
Ds. Register ("Testa", "123123", "dafafa@51aspx.com", false);
}
}
}