Working with Profile Object

Posted by Bravi under ASP.NET on 9/15/2009 | Views : 2932 | Status : [Member] | Replies : 2
Any one can give a example for working with Profile object in 2.0

This is my web.config file like below
<add name="Name" type="System.String"/>

Set Value for Profile like below


Accessing Profile


But while runing it is giving error like "Unable to connect Sql server" like this...

Please Provide how to work with Profile..




Posted by: Vuyiswamb on: 9/15/2009 [Member] [MVP] [Administrator] NotApplicable

Good Morning Bravi

Here are the Good Examples of Profiles in

Thank you for Posting at DotnetFunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda

Bravi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rtpharry on: 9/16/2009 [Member] [MVP] Bronze

You are missing the step which configures the default provider.

Strangely this msdn documentation doesnt mention it either and it is supposed to be a complete walkthrough:

Ah, here we go.

Check out Scotts introduction to using profiles

If you look about half way down you will see the section entitled "Provider Configuration". This shows you how to configure the provider in your web.config which includes the part where you point it at a valid connectionstring (which is the problem you are experiencing).

Bravi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response