欢迎来到天天文库
浏览记录
ID:22376475
大小:69.00 KB
页数:9页
时间:2018-10-28
《moss sso 系列8》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、MOSSSSO系列1 最近写了几个SSO的icrosoft.SharePoint.Portal.SingleSignon; usingMicrosoft.SharePoint.Portal; 或者你可以直接这么做:编辑当前项目的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、简单,暂且不表)注意多半要在数据库登录帐户中添加:NTAUTHORITYANONYMOUSLOGON给个可以创建数据库和管理权限的即可! 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;
此文档下载收益归作者所有