Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use ASP.NET Profile or not?

I need to store a few attributes of an authenticated user (I am using Membership API) and I need to make a choice between using Profiles or adding a new table with UserId as the PK. It appears that using Profiles is quick and needs less work upfront. However, I see the following downsides:

  1. The profile values are squished into a single ntext column. At some point in the future, I will have SQL scripts that may update user's attributes. Querying a ntext column and trying to update a value sounds a little buggy to me.
  2. If I choose to add a new user specific property and would like to assign a default for all the existing users, would it be possible?

My first impression has been that using profiles may cause maintainance headaches in the long run. Thoughts?

like image 824
DotnetDude Avatar asked May 14 '10 22:05

DotnetDude


People also ask

Is ASP.NET still in demand?

The framework is used for creation of applications, which would run on the Windows platform. After a strong legacy of over two decades now, the net development services still remain relevant. As per a report by w3techs, ASP.NET is still used by 7.9% of all the websites whose server-side programming languages are known.

What is ASP.NET profile?

The ASP.NET profile feature associates information with an individual user and stores the information in a persistent format. Profiles allow you to manage user information without requiring you to create and maintain your own database.

Is ASP.NET necessary?

ASP.NET greatly decreases the amount of code needed to build massive applications with tighter security and improved performance. Lesser code encourages the application to easily manage and effectively maintain. These applications have windows authentication which makes the applications more secure.

Is ASP.NET a good choice?

It is fast, reliable, and easy to develop large websites or applications. With lots of tools, libraries, and community support, ASP.NET is a reliable and preferred option for creating large web applications. It's easy to handle errors on this platform due to its type system.


1 Answers

There was an article on MSDN (now on ASP.NET http://www.asp.net/downloads/sandbox/table-profile-provider-samples) that discusses how to make a Profile Table Provider. The idea is to store the Profile data in a table versus a row, making it easier to query with just SQL.

More onto that point, SQL Server 2005/2008 provides support for getting data via services and CLR code. You could conceivably access the Profile data via the API instead of the underlying tables directly.

As to point #2, you can set defaults to properties, and while this will not update other profiles immediately, the profile would be updated when next it is accessed.

like image 99
Jonathan Bates Avatar answered Nov 09 '22 22:11

Jonathan Bates