Go Back   Velocity Reviews > Newsgroups > DotNet
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

DotNet - Newbie problem with Profiles

 
Thread Tools Search this Thread
Old 06-26-2006, 12:38 AM   #1
Default Newbie problem with Profiles


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


Jaimie
Jaimie is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump