| Author |
Message |
Guest
|
Posted:
Wed Aug 10, 2005 8:53 am Post subject:
Problem creating user and address with MSIB classes in ASP.N |
|
|
Hello
I have a problem creating users and addresses in ASP.NET using the
classes in Microsoft.Solutions.Framework namespace.
I have a web page where a user enters name, address, e-mail address and
so on (registration). I want to create a new UserObject (user profile
in CS) for the user and attach an Address.
The UserObject is created correctly. I then create an Address object
which seems OK. However, I see that the UserId in the Address object is
not the same as the UserId of the newly created UserObject. When the
new user goes to look at his user profile, no address information is
displayed. How can I ensure the UserId in UserObject and Address are
the same?
Have anybody had any experience with this? Answers would be most
welcomed.
Regards
Nils Erik Asmundvaag |
|
| Back to top |
|
 |
Joe Wasson [MSFT]
Guest
|
Posted:
Wed Aug 17, 2005 8:52 pm Post subject:
RE: Problem creating user and address with MSIB classes in A |
|
|
I believe the problem is cause by creating the address before the new user
you created becomes the "current user". When you create an address using
the Microsoft.Solution.Framework classes it takes the current user from
CommerceContext and uses that UserID as the UserID in the Address profile
object. After you create the new profile you need to make that profile the
current user according to Commerce Server.
-joe
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: nea@apropos-internett.no
Newsgroups: microsoft.public.commerceserver.general
Subject: Problem creating user and address with MSIB classes in ASP.NET
Date: 9 Aug 2005 23:46:53 -0700
Hello
I have a problem creating users and addresses in ASP.NET using the
classes in Microsoft.Solutions.Framework namespace.
I have a web page where a user enters name, address, e-mail address and
so on (registration). I want to create a new UserObject (user profile
in CS) for the user and attach an Address.
The UserObject is created correctly. I then create an Address object
which seems OK. However, I see that the UserId in the Address object is
not the same as the UserId of the newly created UserObject. When the
new user goes to look at his user profile, no address information is
displayed. How can I ensure the UserId in UserObject and Address are
the same?
Have anybody had any experience with this? Answers would be most
welcomed.
Regards
Nils Erik Asmundvaag |
|
| Back to top |
|
 |
Nils Erik Asmundvaag
Guest
|
Posted:
Wed Aug 24, 2005 12:52 pm Post subject:
Re: Problem creating user and address with MSIB classes in A |
|
|
Hello
Thank you for the answer. Do you also know how I change the "current
user"?
Regards
Nils Erik Asmundvaag |
|
| Back to top |
|
 |
Joe Wasson [MSFT]
Guest
|
Posted:
Wed Aug 24, 2005 8:53 pm Post subject:
Re: Problem creating user and address with MSIB classes in A |
|
|
Use SetProfileTicket or SetAuthTicket on
CommerceContext.Current.AuthenticationInfo. You may need to set
CommerceContext.Current.UserProfile to null if you (or something you're
using) have already used the UserProfile property.
Alternatively you can set the UserProfile property yourself with the
profile you just created.
-joe
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "Nils Erik Asmundvaag" <nea@apropos-internett.no>
Subject: Re: Problem creating user and address with MSIB classes in ASP.NET
Date: 24 Aug 2005 04:14:20 -0700
Hello
Thank you for the answer. Do you also know how I change the "current
user"?
Regards
Nils Erik Asmundvaag |
|
| Back to top |
|
 |
|
|
|
|