Problem creating user and address with MSIB classes in ASP.N
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Problem creating user and address with MSIB classes in ASP.N

 
Post new topic   Reply to topic    Windows Server Forum Index -> Commerce Server
Author Message
Guest






Posted: Wed Aug 10, 2005 8:53 am    Post subject: Problem creating user and address with MSIB classes in ASP.N Reply with quote

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 Reply with quote

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 Reply with quote

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 Reply with quote

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
 
Post new topic   Reply to topic    Windows Server Forum Index -> Commerce Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB