Hi all,
I have just started using asp.net and found out about profiles. I have SQL 2005 installed so ran aspnet_regsql.exe to install the aspnetdb database (which worked fine). Then I added the following code to my web.config file:
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer"
connectionString="Data Source=JAIMIEDB\\DEVELOPMENT;Initial Catalog=aspnetdb;Integrated Security=SSPI" />
</connectionStrings>
<profile defaultProvider="MyProfileProvider">
<properties>
<add name="FirstName" />
</properties>
<providers>
<clear/>
<add name="MyProfileProvider" connectionStringName="LocalSqlServer"
applicationName="/WebSite1"
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
This all seemed to work ok but when I try to reference a profile property such as FirstName I get the following error:
InvalidOperationException was handled by user code
Instance failure
Have had a quick google check to see what that error means but didnt come up with much, so any help anyone has on this would be really appreciated
I have just started using asp.net and found out about profiles. I have SQL 2005 installed so ran aspnet_regsql.exe to install the aspnetdb database (which worked fine). Then I added the following code to my web.config file:
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer"
connectionString="Data Source=JAIMIEDB\\DEVELOPMENT;Initial Catalog=aspnetdb;Integrated Security=SSPI" />
</connectionStrings>
<profile defaultProvider="MyProfileProvider">
<properties>
<add name="FirstName" />
</properties>
<providers>
<clear/>
<add name="MyProfileProvider" connectionStringName="LocalSqlServer"
applicationName="/WebSite1"
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
This all seemed to work ok but when I try to reference a profile property such as FirstName I get the following error:
InvalidOperationException was handled by user code
Instance failure
Have had a quick google check to see what that error means but didnt come up with much, so any help anyone has on this would be really appreciated