473,597 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

When Profile should be used

By default profile use sql server xpress provider and probabily, caches
stored data when they are requested for the first time,

So the question is: why we should use profile instead of storyng,
retrieving and caching user data manually from a database?

Is it only for an easier approach of state maintenance, or are there
other advantages?

Apr 9 '06 #1
5 1274
Hi,

there are many reasons why profile has got attention.

- Provider model: you can specify yourself how the profile data is stored,
and what format it takes. You can also switch to use another datastore than
SQL Server or completely another than database
- Provider model implementation is hidden behind the API e.g data model
change & data changes do not affect the usage
- You can define in web.config what gets stored in the profile (what is
personalized)
- you can also have anonymous profile, and you can migrate that to "full"
one if user authenticates/registers etc
- you can change the data on the fly (via Profile property on the Page)

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"cipcip" <pa******@tisca li.it> wrote in message
news:11******** *************@g 10g2000cwb.goog legroups.com...
By default profile use sql server xpress provider and probabily, caches
stored data when they are requested for the first time,

So the question is: why we should use profile instead of storyng,
retrieving and caching user data manually from a database?

Is it only for an easier approach of state maintenance, or are there
other advantages?

Apr 9 '06 #2
One of the main advantages of using .NET profiles is convenience. The
functionality most people need to persist user data is all there for
you, so you don't need to write you own code.

It also makes your code modular and independant of any particular
implementation because you're coding against a standard Profile
Provider interface. If you ever need to change how your profiles work,
or the database type, you just plug in a new provider without having to
change your application code.

Profiles are also very easy to manage through web.config, you simply
add a new property to the <profile> section and it automatically
appears as a strongly-typed property of you Page.Profile object.

HTH,

Chris

Apr 9 '06 #3
sincerely thanks for your spontaneous support,

but i have another question related:

i usally manage profile variables manually:

for example i replace this: Profile.Context .Add("email", email)

with this one: myProfileClass. setEmail(email)

setEmail is a function that store user email in a provider like profile
do,
i used this class because i discovered profile after i wrote this
class,
so the question is do you think i should rewrite the intere application
with the use of profile or can i continue use my own class for users
variables managment?

Apr 9 '06 #4
Hi,

nothing prevents you from continue using the ready-made solution (and
nothing breaks it) if you feel the cost migrating to built-in profile is too
big.

Basically the profile implementation could also be creating a provider,
which would use your current profile implementation under the covers (e.g
abstract away from your current implementation, and take ASP.NET Profile as
a top-levbel to it), but that could be a big job.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"cipcip" <pa******@tisca li.it> wrote in message
news:11******** **************@ z34g2000cwc.goo glegroups.com.. .
sincerely thanks for your spontaneous support,

but i have another question related:

i usally manage profile variables manually:

for example i replace this: Profile.Context .Add("email", email)

with this one: myProfileClass. setEmail(email)

setEmail is a function that store user email in a provider like profile
do,
i used this class because i discovered profile after i wrote this
class,
so the question is do you think i should rewrite the intere application
with the use of profile or can i continue use my own class for users
variables managment?

Apr 9 '06 #5
It depends how much effort you think would be involved, and whether it
would be worth it. It's probably not worth rewriting just for the sake
of it, but it might improve the long-term maintainability of your code
if it uses a standard ASP.NET 2.0 profile implementation.

It also depends on whether the built-in ASP.NET 2.0 profile provider
supports everything you're doing currently, or whether there'd be
additional work required building a custom profile provider.

Chris

Apr 9 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
1947
by: Ali | last post by:
I did the folloing in python shell: >>> x = 5.07e-25 >>> x = long(x) >>> print x 0L Um... I was under the impresion that long numbers had very very long precision. But, it seems that in this case it rounded it to zero :(
0
2046
by: Reto Zingg | last post by:
Hi I have here a strange Problem, I monitor with a script our hosting enviroment, so far my script works very well, but unfortunately some of our costumers change to an other HSP :-( and sometimes, we still have them in our database. So that they also appears in my list with domainnames which i check. The problem now is that some of them use IIS and the default page is password protected and I don't have a loggin ;-), but my script...
3
1998
by: JR | last post by:
Take a look at TestStruct1 and TestStruct2. Clearly, the D2 part of the union is MUCH larger than the D1 portion. I would expect sizeof(TestStruct1)==sizeof(TestStruct2) but that is not the case using Microsoft Visual C++ 2003. Here is what I get sizeof(TestStruct1)==0x108 sizeof(TestStruct2)==0x104 Is this normal C++ compiler behavior, or a bug in the compiler?
1
3214
by: Obe | last post by:
PLEASE HELP! I'm writing a function to populate DropDownLists from and xml file. I am having a problem getting my XPathNavigator to select any nodes when I attach a schema to my xml document. Xml Doc: Dropdown.xml XML Schema: Dropdown.xsd Here is my XML Document...
1
3255
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True Response.ContentType ="application/vnd.ms-excel" 'application/msword
10
1613
by: Kathy Burke | last post by:
Hi, in trying to discover why my RegisterStartUpScript wouldn't work (I do NOT see it in the HTML source), I looked at the HTML source of a page where I do an XslTransform. First, I get the transform results as expected, beginning with <html> and ending with </html> but then I see the following immediately after that: <HTML> <HEAD>
3
1460
by: Dick | last post by:
My simple example is shown below. Please can you explain why the BackColor of the menu's StaticSelectedStyle and StaticHoverStyle are not applied whilst the background-color of the tr and td's are applied via the style. Thanks. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
3
1735
by: callre | last post by:
when i used javascript onchange() the error is coming "object doesnt support this property" my code is- <script type='text/javascript' language="javascript"> function change() { document.uplcsv.submit(); } </script>
4
981
by: amitkumar19 | last post by:
Hello All Of U. Hey I Dont Understand What Happen I Declear Dir(path) Used In Vb6 Code Then It Give The Error Msg Wrong No Argument Or Invalid Property Assigned. Path Is String Var & I Assign Value On Path. 1. I Add Refrence A. Microsoft Runtimf Script. Used In My Prg. Anybody Can Help. Thanks
0
8267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8258
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6681
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5423
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3880
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3921
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2394
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1493
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1229
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.