我想弄清楚是否有可能使用SqlProfileProvider(aspnetdb)为通过Windows集成身份验证向SharePoint 2007网站进行身份验证的用户存储某些配置文件信息。我们的目标是能够开发ASP.NET代码,为每个用户存储一些个性化字符串,并将在ASP.NET或SharePoint网站中运行。我希望我可以使用SqlProfileProvider,然后它可以在ASP.NET或SharePoint中使用,前提是我向web.config添加了正确的提供程序。SharePoint 2007:使用Windows集成身份验证的SqlProfileProvider?
下面是我在SharePoint Web应用程序的web.config,但是我的ASPX代码隐藏Context.Profile里面总是空:
<profile automaticSaveEnabled="true" defaultProvider="AspNetSqlProfileProvider">
<providers>
<clear/>
<add name="AspNetSqlProfileProvider"
connectionStringName="aspnetdb"
applicationName="simple_test"
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
<properties>
<add name="TestName" type="System.String" allowAnonymous="false"/>
</properties>
(注意ASPNETDB是web.config中其他地方的有效连接字符串)。
任何人都有将aspnetdb配置文件提供程序连接到Windows身份验证的经验,或者只有在Forms/membership身份验证有效时才有用?有关如何在ASP.NET/SharePoint中保持用户设置而无需使用Cookie或从头开始编写数据模型和访问层的任何其他建议?
你只是想存储Web部分的个性化设置,或者你想存储他们的整个网站/网络? – AdamBT 2009-08-13 00:35:01
有趣的,如果这个工程。我的直觉是它会搞砸SharePoint的某些部分,但值得一试。 – 2009-08-13 09:02:05
@AdamBT - 我想在每个用户的基础资料值存储与整个Web站点的范围,或包括SharePoint喜欢称它为SiteCollection。 – Mike 2009-08-13 13:13:05