I am trying to figure out if it's possible to use the SqlProfileProvider (aspnetdb) for storing certain profile information for users that are authenticated to a SharePoint 2007 site by Windows Integrated Authentication. The goal is be able to develop ASP.NET code that stores a few personalization strings for each user and will run in an ASP.NET or SharePoint site. I was hoping I could use the SqlProfileProvider and then it would be available in either ASP.NET or SharePoint provided I added the correct provider to web.config.
Here's what I have in web.config in the SharePoint web application, however inside my ASPX code-behind Context.Profile is always null:
<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>
(Note that aspnetdb is a valid connection string elsewhere in the web.config).
Anyone have experience with hooking up the aspnetdb Profile provider in conjunction with Windows Authentication, or does that only work if Forms/membership authentication is in effect? Any other suggestions on how the user settings can be persisted in ASP.NET/SharePoint without having to use cookies or write a data model and access layer from scratch?