Because the project requires a Forum, there was originally a CS, a well-known foreign Open Source Forum under. net. However, in order to adapt to the domestic ethos, we finally choose discuz, which is very popular in China! NT. Many people have completed the integration of discuz and the website developed by Asp.net. However, no detailed description is found on the Internet. There are many methods. Here, I will write this experience and hope it will be useful to you. Read this article
Article Why? Title = % E5 % a6 % 82% E4 % BD % 95% E4 % BD % BF % E7 % 94% A8 % E6 % B5 % 8B % E8 % af % 95% E6 % 8e % A7 % E5 % 88% B6 % E5 % 8f % B0 I had an epiphany... as described in the above article, first press discuz! NT user guide. Install the Forum in Windows 2003. Add apikey and so on as admin. Use vs2008 to create a project and add reference of toolkit. dll and JSON. Well, if you have read the above article carefully, I will post some more here.
Code .
When registering a new user in the project, the user registration of the Forum is also called, so that the registration is synchronized. As for deleting a user, it seems that discuz! NT does not provide APIs. You can delete the discuz directly when deleting a user in the project! Related items in the User table of NT.
The Code (implementing logon and registration) is as follows:
Code
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 = " Bdb7performancef77149adec776b1b6e92ee8 " ;
String URL = " Http: // localhost/ " ;
Protected VoidPage_load (ObjectSender, 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 );
}
}
}
Http://four-corner.appspot.com/