Newbie problem with Profiles


Joined
Jun 26, 2006
Messages
1
Reaction score
0
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 :)
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top