TargetingContextProfile
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > TargetingContextProfile




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    TargetingContextProfile  
Brian


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-16-04 10:52 PM

Hi,
I'm trying to use TargetingSystem.TargetingContextProfile as Session, but I
can't retrive the value from other pages. My question is how to use
TargetingContextProfile
as Session? Can I do that ?
Thanks for the help!

Set value.
CommerceContext csContext = CommerceContext.Current;
csContext.TargetingSystem.TargetingContextProfile["Key"].Value = lid;

Get value
CommerceContext csContext = CommerceContext.Current;
value = csContext.TargetingSystem.TargetingContextProfile["Key"].Value;








[ Post a follow-up to this message ]



    RE: TargetingContextProfile  
David Messner [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-18-04 10:49 PM

TargetingContext is a non-peristent profile - you get a new one on every
page by design (a new Guid is created for each page request where you
access this profile through the TargetingSystem property).

You can create your own non-persistent profile definition for this purpose
(and don't map it to any storage) or use TargetingContext profile through
the profile APIs and not through the
TargetingSystem.TargetingContextProfile property, which is where you get a
new one created with a new Guid on every page request.

Note that this DOES NOT WORK in a load-balanced Web farm scenario; a
non-peristent profile only exists within the profile object cache which is
local to the process (in-memory).  You're probably much better off using
ASP.NET session state, cookies, or another mechanism (such as DBStorage
persistence or your own DB persistence).

regards
-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2004 Microsoft Corporation.  All rights
reserved.

--------------------
Thread-Topic: TargetingContextProfile
thread-index: AcSzy1jAQfNipw6lQ86WeMe9kcLivw==
X-WBNR-Posting-Host: 141.157.250.249
From: "examnotes" <Brian@discussions.microsoft.com>
Subject: TargetingContextProfile
Date: Sat, 16 Oct 2004 14:59:02 -0700
Lines: 17
Message-ID: <9DFB41F1-7D4B-47C4-89E9-EE6AADD51BBD@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14995
X-Tomcat-NG: microsoft.public.commerceserver.general

Hi,
I'm trying to use TargetingSystem.TargetingContextProfile as Session, but I
can't retrive the value from other pages. My question is how to use
TargetingContextProfile
as Session? Can I do that ?
Thanks for the help!

Set value.
CommerceContext csContext = CommerceContext.Current;
csContext.TargetingSystem.TargetingContextProfile["Key"].Value = lid;

Get value
CommerceContext csContext = CommerceContext.Current;
value = csContext.TargetingSystem.TargetingContextProfile["Key"].Value;









[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:08 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register