Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Commerce Server Userprofile management > CommerceContext...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 225 of 267
Post > Topic >>

CommerceContext.Current.UserID InvalidCastException

by =?Utf-8?B?RGF2ZSBNYXJpbmk=?= <DaveMarini@[EMAIL PROTECTED] Jul 5, 2006 at 06:45 AM

I am using a custom Member****p Provider to map our existing user data store

to the Commerce Server Profiles System.  I have set up the userProfile 
web.config element to use ASP.NET and have specified our custom 
profileDefinition and the needed properties.  My problem is that the
unique 
key for our DataStore is the Primary Key (int).  Since I need this to be
the 
CommerceContext.Current.UserID value, I'm getting an invalid cast
exception 
whenever I try to access this.  I have found a workaround, particularly 
setting the UserID explicitly in the PreRequestHandlerExecute event of the

Global, but this has to be done on each request and I'm worried that there

may be issues that creep up later as a result of this perhaps in profile
--> 
order linkage, etc..

Our other solution was to use UPM instead of ASP.NET as then I can create
an 
authTicket object with the stringified value of the integer ID we use as
the 
user's name, but I am aware that AuthManager is obsolete in 2007 and not 
recommended for new development.  

Does anyone have any ideas for how I can accomplish this without hacking
it 
into working?

Thanks,

Dave
 




 3 Posts in Topic:
CommerceContext.Current.UserID InvalidCastException
=?Utf-8?B?RGF2ZSBNYXJpbmk  2006-07-05 06:45:02 
Re: CommerceContext.Current.UserID InvalidCastException
"Amy" <amy.d  2006-07-11 02:53:30 
Re: CommerceContext.Current.UserID InvalidCastException
=?Utf-8?B?RGF2ZSBNYXJpbmk  2006-07-11 11:37:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 17:29:31 CST 2008.