我想弄清楚是否有可能使用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