在web application下对SPS的OM进行开发时遇到的一些问题- 十月的专栏 ...
当时在web application下对SPS的OM进行开发时遇到的一些问题,作个记录便于以后参考。

问题1:

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Data.SqlClient.SqlException: 无法打开登录 'SPS01_Config_db' 中请求的数据库。登录失败。用户 'NT AUTHORITY\NETWORK SERVICE' 登录失败。

源错误:


源文件: f:\wwwroot\share point webapplication\webform3.aspx.cs    行: 42

堆栈跟踪:

[SqlException: 无法打开登录 'SPS01_Config_db' 中请求的数据库。登录失败。 
用户 'NT AUTHORITY\NETWORK SERVICE' 登录失败。] 
Microsoft.SharePoint.Portal.Data.a.c() Microsoft.SharePoint.Portal.Data.a.c() 
Microsoft.SharePoint.Portal.Data.a.a(SqlCommand A_0, CommandBehavior A_1, Boolean A_2) 
Microsoft.SharePoint.Portal.Data.a.a(SqlCommand A_0, CommandBehavior A_1, Boolean A_2)
Microsoft.SharePoint.Portal.Data.a.a(SqlCommand A_0, CommandBehavior A_1)
Microsoft.SharePoint.Portal.Data.a.a(SqlCommand A_0, CommandBehavior A_1)
Microsoft.SharePoint.Portal.Topology.PortalSiteCollection.get_Item(Uri siteUrl) 
Share_Point_WebApplication.WebForm3.UserProfileSample() 
in f:\wwwroot\share point webapplication\webform3.aspx.cs:42 Share_Point_WebApplication.WebForm3.Page_Load(Object sender, EventArgs e) 
in f:\wwwroot\share point webapplication\webform3.aspx.cs:29 System.Web.UI.Control.OnLoad(EventArgs e)
 +67 System.Web.UI.Control.LoadRecursive() 
+35 System.Web.UI.Page.ProcessRequestMain() +750 

解决:

当应用程序用到SPS对象模型时需要用到与SPS相同的应用程序池,即“MSSharePointPortalAppPool”。

问题2:SPS开发中非administrator问题

     当通过OM对SPS中的UserProfileManager进行UserProfile的for 遍历时,如果不是SPS的Administrator就会有这样的提示:“Access Denied: Only an administrator may enumerate through all user profiles”。

相关资料链接:

发表于 @ 2005年02月28日 17:35:00 | | | |

 | 

郑重声明:资讯 【在web application下对SPS的OM进行开发时遇到的一些问题- 十月的专栏 ...】由 发布,版权归原作者及其所在单位,其原创性以及文中陈述文字和内容未经(企业库qiyeku.com)证实,请读者仅作参考,并请自行核实相关内容。若本文有侵犯到您的版权, 请你提供相关证明及申请并与我们联系(qiyeku # qq.com)或【在线投诉】,我们审核后将会尽快处理。
—— 相关资讯 ——