Discussion:
ProfileContext
(too old to reply)
Xcel
2006-10-11 16:25:01 UTC
Permalink
Can ProfileContext be run from a machine other than the server or do you have
to use ProfileManagmentContext if the code won't be executed on the Commerce
Server.

If ProfileContext can be run from a machine other than the server can I get
sample code of looking up a profile.

Thank You.
Joseph Johnson
2006-10-11 17:13:34 UTC
Permalink
Xcel,

Alan Faulkner's blog appears to have the code you're looking for when using
ProfileManagementContext.

http://blogs.msdn.com/akfaulkner/archive/2006/06/14/631855.aspx

ProfileContext appears to have a constructor which takes connection strings
to a database, so I would assume that you can run this class outside of a
machine running Commerce Server, although I've never done it.

As per your other request for sample code:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/CS07Default/html/bcfdec35-7ad2-4657-837e-e57690ab143c.asp

I think what you're looking for might even be a bullet point on that page!

Cheers,

Joe
Post by Xcel
Can ProfileContext be run from a machine other than the server or do you have
to use ProfileManagmentContext if the code won't be executed on the Commerce
Server.
If ProfileContext can be run from a machine other than the server can I get
sample code of looking up a profile.
Thank You.
Xcel
2006-10-11 17:34:02 UTC
Permalink
Joe,

Thank you for the feedback. I was using the sample code from the
documentation however, the code faults as soon as it tries to create the
ProfileContext.

Probably since, I am not running on the same box as Commerce Server, I will
try the SQL Connect string and see if that solves the problem. Do you know
if there is any sample code for the connection floating around - I could not
seem to find any.

Chris...
Post by Joseph Johnson
Xcel,
Alan Faulkner's blog appears to have the code you're looking for when using
ProfileManagementContext.
http://blogs.msdn.com/akfaulkner/archive/2006/06/14/631855.aspx
ProfileContext appears to have a constructor which takes connection strings
to a database, so I would assume that you can run this class outside of a
machine running Commerce Server, although I've never done it.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/CS07Default/html/bcfdec35-7ad2-4657-837e-e57690ab143c.asp
I think what you're looking for might even be a bullet point on that page!
Cheers,
Joe
Post by Xcel
Can ProfileContext be run from a machine other than the server or do you have
to use ProfileManagmentContext if the code won't be executed on the Commerce
Server.
If ProfileContext can be run from a machine other than the server can I get
sample code of looking up a profile.
Thank You.
Joseph Johnson
2006-10-11 19:36:11 UTC
Permalink
Xcel,

As near as I can tell, it might be the same OLEDB connection string that's
in Commerce Server Manager; at least, that's what the documentation seems to
suggest.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkmref/html/C_Microsoft_CommerceServer_Runtime_Profiles_ProfileContext_ctor_1_ab554efc.asp

Again, I haven't tried any of this, and it isn't exactly "best practice" to
hook into the Commerce Server system from an external machine without going
through web services, but I'll assume that you've explored that avenue at
this point.

Joe
Post by Xcel
Joe,
Thank you for the feedback. I was using the sample code from the
documentation however, the code faults as soon as it tries to create the
ProfileContext.
Probably since, I am not running on the same box as Commerce Server, I will
try the SQL Connect string and see if that solves the problem. Do you know
if there is any sample code for the connection floating around - I could not
seem to find any.
Chris...
Post by Joseph Johnson
Xcel,
Alan Faulkner's blog appears to have the code you're looking for when using
ProfileManagementContext.
http://blogs.msdn.com/akfaulkner/archive/2006/06/14/631855.aspx
ProfileContext appears to have a constructor which takes connection strings
to a database, so I would assume that you can run this class outside of a
machine running Commerce Server, although I've never done it.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/CS07Default/html/bcfdec35-7ad2-4657-837e-e57690ab143c.asp
I think what you're looking for might even be a bullet point on that page!
Cheers,
Joe
Post by Xcel
Can ProfileContext be run from a machine other than the server or do
you
have
to use ProfileManagmentContext if the code won't be executed on the Commerce
Server.
If ProfileContext can be run from a machine other than the server can I get
sample code of looking up a profile.
Thank You.
Loading...