{"id":4997,"date":"2014-03-30T17:41:29","date_gmt":"2014-03-30T17:41:29","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/ordercontext-from-a-non-web-application-collection-of-common-programming-errors\/"},"modified":"2014-03-30T17:41:29","modified_gmt":"2014-03-30T17:41:29","slug":"ordercontext-from-a-non-web-application-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/ordercontext-from-a-non-web-application-collection-of-common-programming-errors\/","title":{"rendered":"OrderContext from a non Web application.-Collection of common programming errors"},"content":{"rendered":"<p>Kevin,<\/p>\n<p>Vinayak&#8217;s blog was the first place this was covered: http:\/\/blogs.msdn.com\/vinayakt\/archive\/2006\/08\/30\/Programming-the-Commerce-Server-2007-catalog-system_3A00_-Creating-the-CatalogContext-.aspx<\/p>\n<p>The In-Process paradigm will basically load up the CatalogContext properties by looking at settings in the Commerce Server Configuration database.\u00a0 As such, this pattern requires that you have Commerce Server installed and correctly configured on the machine you are running this application on.\u00a0 The security pattern for the in-process context is a little bit simpler (it can usually get away with having the same identity as RunTimeUser).\u00a0<\/p>\n<p>The Service Agent paradigm will populate the context object by proxy over your web service.\u00a0 You don&#8217;t need to install Commerce Server on the same box where you run your code from, but you&#8217;ll need access to some of the libraries packaged with Commerce Server.\u00a0 The security pattern is a little more complex, as you&#8217;ll need to add your application identity into the appropriate AzMan roles.\u00a0 I believe there is also a performance penalty to be paid here, as you&#8217;re going to be communicating with Commerce Server over a web service layer, while the In-Process operates directly.<\/p>\n<p>I don&#8217;t think either of these patterns is more beneficial than the other in relation to your SQL server location.\u00a0 SQL Server should *always* be on a seperate box from Commerce Server in any production deployment.\u00a0 Performance-wise, I think In-Process is probably going to work better, but it might be hard to sell a customer on another CS2007 license so they can run some of these applications.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kevin, Vinayak&#8217;s blog was the first place this was covered: http:\/\/blogs.msdn.com\/vinayakt\/archive\/2006\/08\/30\/Programming-the-Commerce-Server-2007-catalog-system_3A00_-Creating-the-CatalogContext-.aspx The In-Process paradigm will basically load up the CatalogContext properties by looking at settings in the Commerce Server Configuration database.\u00a0 As such, this pattern requires that you have Commerce Server installed and correctly configured on the machine you are running this application on.\u00a0 The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4997","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4997"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4997\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}