資源描述:
《moss sso 系列8》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
1、MOSSSSO系列1 最近寫了幾個(gè)SSO的icrosoft.SharePoint.Portal.SingleSignon; usingMicrosoft.SharePoint.Portal; 或者你可以直接這么做:編輯當(dāng)前項(xiàng)目的icrosoft.SharePoint.Portal.SingleSignon,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71E9BCE111E9429C/> <addassembly=Micros
2、oft.SharePoint.Portal.SingleSignon.Security,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71E9BCE111E9429C/> <addassembly=Microsoft.SharePoint.Portal,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71E9BCE111E9429C/> Step2:配置MOSS上的SSO (
3、簡(jiǎn)單,暫且不表)注意多半要在數(shù)據(jù)庫登錄帳戶中添加:NTAUTHORITYANONYMOUSLOGON給個(gè)可以創(chuàng)建數(shù)據(jù)庫和管理權(quán)限的即可! Step3:Coding... 2種寫法都可以,暫不明白? 寫法1 stringstrSSOLogonFormUrl=SingleSignonLocator.GetCredentialEntryUrl(DEMOSSO); string[]rgGetCredentialData=null; Creden
4、tials.GetCredentials(1,DEMOSSO,refrgGetCredentialData); stringstrName=rgGetCredentialData[0]; stringstrPe=IntPtr.Zero; IntPtrpPassyCreds=isso.GetCredentials(DEMOSSO); pUserName=System.Runtime.InteropServices.Marshal.SecureStr
5、ingToBSTR(myCreds.UserName); pPass.Runtime.InteropServices.Marshal.SecureStringToBSTR(myCreds.Passe=System.Runtime.InteropServices.Marshal.PtrToStringBSTR(pUserName); stringuP.Runtime.InteropServices.Marshal.PtrToStringBSTR(pPassUrl);
6、 } else { Response.Redirect(strSSOLogonFormUrl); } } Step4:讀ExchangeServer2007的新郵件 引用o); //ICredentialscreds=CredentialCache.DefaultNetailadmin,Pass!o) exchangeServer.Credentials=creds
7、; exchangeServer.Url=ex; DistinguishedFolderIdType[]folderIDArray=new123下一頁——..,。DistinguishedFolderIdType[1]; folderIDArray[0]=neeType.inbox; PathToUnindexedFieldTypeptuftDisplayName=nee.FieldURI=UnindexedFiel
8、dURIType.folderDisplayName; PathToExtendedFieldTypepteftment=neent.PropertyTag=0x3004;//PR_MENT pteftment.PropertyType=MapiPropertyTypeType.String; GetFolderTypemyfoldertype=neyfoldertype.FolderIds=folderIDArray;