When you create a new Web site project in Visual Studio then the object that is returned from Profile will be (automatically) generated for you. When you create a Web application project or an MVC project, you will have to roll your own.
This probably sounds more difficult than it is. You need to do the following:
- Create a database using aspnet_regsql.exe This tool is installed along with the .NET framework.
- Write a class that derives from ProfileGroupBase or install the Web Profile Builder (WPB) that can generate the class for you from the definition in Web.Config. I have been using WPB for a while and up until now it has done what is expected of it. If you have a lot of properties, using WPB can save quite a bit of time.
- Make sure the connection to the database is properly configured in Web.Config.
- Now you are set to create an instance of your profile class (in the controller)
- You will probably need the profile property values in your views. I like to pass the profile object itself along to the view (not individual properties).