In a new project, the customer requested to log on to Moss from a system using form authentication, but the user name and password cannot be entered; currently, the customer's environment has a form authentication system. Moss is newly installed in a domain, but the form authentication system is not in the domain, so there is a problem of user synchronization between two systems? This is not the topic of today. How can we achieve Single login between two systems?
In the past, we only used a single Moss logon and moss to log on to other systems. Now we need to log on to Moss using a form-certified system?
Finally, I found a relatively simple method. I used Ajax and Haha. I don't want to talk about it anymore. I just paste it directly.CodeRight!
Code
1 Function Initajax ()
2 {
3 VaR Ajax = False ;
4 Try
5 {
6Ajax= NewActivexobject ("Msxml2.xmlhttp");
7}
8 Catch (E)
9 {
10 Try
11 {
12Ajax= NewActivexobject ("Microsoft. XMLHTTP");
13}
14 Catch (E)
15 {
16Ajax= False;
17}
18 }
19
20 If ( ! Ajax && Typeof XMLHttpRequest ! = ' Undefined ' )
21 {
22Ajax= NewXMLHttpRequest ();
23}
24 Return Ajax;
25 }
26
27 Function Login ()
28 {
29 Try
30 {
31 VaR Strname = ' Aw.com \ sales ' ;
32 VaR Strpwd = ' Pass @ word1 ' ;
33 VaR Location = ' Http: // MOSS: 2000 ' ;
34 VaR Ajax = New Initajax ();
35
36 Ajax. Open ( ' Post ' , Location, False , Strname, strpwd );
37 Ajax. Send ();
38 If (Ajax. Status = 200 )
39 {
40Window. Location. href=Location;
41}
42
43 }
44 Catch (E)
45 {}
46 }