<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6011393917265969473</id><updated>2012-01-02T05:21:19.735-05:00</updated><category term='Commerce Entities'/><category term='Multi-Channel Commerce Foundation'/><category term='Pipeline'/><category term='Using &quot;Attach to Process&quot; when debugging Sharepoint applications on Microsoft Server 2008 IIS7 w3wp.exe'/><category term='Microsoft Commerce Server Mojave Newbie Learning'/><category term='Weakly Typed Property'/><category term='Commerce Server 2007'/><category term='Sorting Profile in Commerce Server 2007 and Mojave'/><category term='Commerce Server 2009'/><category term='MCCF'/><category term='Refreshing Cache from Mojave Code Caching in Commerce Server 2007'/><category term='Commerce Operations'/><category term='Automatic TFS Sign-in on Microsoft Server 2008 User Profile Manage Network Passwords'/><category term='XCOPY Commerce Server Hive Flat Recursive Copy'/><category term='Refresh Cache Commerce Server 2007 SiteCacheRefresh.axd ProfileCache'/><title type='text'>Commerce Server Guy</title><subtitle type='html'>A blog about Microsoft Commerce Server 2009</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-6778307477956901065</id><published>2010-03-03T16:19:00.004-05:00</published><updated>2010-03-03T16:21:01.221-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MCCF'/><category scheme='http://www.blogger.com/atom/ns#' term='Commerce Entities'/><category scheme='http://www.blogger.com/atom/ns#' term='Commerce Server 2009'/><category scheme='http://www.blogger.com/atom/ns#' term='Commerce Operations'/><category scheme='http://www.blogger.com/atom/ns#' term='Multi-Channel Commerce Foundation'/><title type='text'>Developing with Multi-Channel Commerce Foundation - Commerce Server 2009</title><content type='html'>I have started a new series of articles on learning how to develop against the Multi-Channel Commerce Foundation that comes with Commerce Server 2009. To read the first installment of the article, head over to my new blog at:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://commerceserverguy.wordpress.com/2010/03/03/developing-with-commerce-server-2009-learn-multi-channel-commerce-foundation/"&gt;http://commerceserverguy.wordpress.com/2010/03/03/developing-with-commerce-server-2009-learn-multi-channel-commerce-foundation/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-6778307477956901065?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/6778307477956901065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=6778307477956901065' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/6778307477956901065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/6778307477956901065'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2010/03/developing-with-multi-channel-commerce.html' title='Developing with Multi-Channel Commerce Foundation - Commerce Server 2009'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-3352470961483026739</id><published>2010-01-30T00:18:00.003-05:00</published><updated>2010-01-30T00:23:28.718-05:00</updated><title type='text'>Looking Back</title><content type='html'>Ok ... I kinda feel bad. I was all ready and set to start this blogging thing again and give it a try this time on my now preferred platform, wordpress, but then I realized how many other CS blogs actually refer to mine. And it's actually already doing pretty well in SEO. So as much as I am ashamed as using this blog as my dumping ground, with no regular updates, and even the posts I did make are really in haste and just there with absolutely no effort to fix, I think I am going to have keep this blog.&lt;br /&gt;&lt;br /&gt;However, I do plan to start fresh, and make at least one decent post a month. Yes a month. This is what I used to do in school. I'd aim really low, trick my head into thinking that I'll barely pass a course. And then I'd get a B+ and I'd be over the moon. So I'll aim for a month. If I end up doing two a month, that's awesome!&lt;br /&gt;&lt;br /&gt;But the thing I have to concentrate on more is the quality of my posts. They really have to start looking like I have some interest in doing this. They shouldn't look like cut and pastes from my POCs.&lt;br /&gt;&lt;br /&gt;Let's see.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-3352470961483026739?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/3352470961483026739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=3352470961483026739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/3352470961483026739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/3352470961483026739'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2010/01/looking-back.html' title='Looking Back'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-1894230154563814999</id><published>2009-09-17T12:12:00.006-04:00</published><updated>2009-09-17T12:35:28.751-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Commerce Server 2007'/><category scheme='http://www.blogger.com/atom/ns#' term='Pipeline'/><category scheme='http://www.blogger.com/atom/ns#' term='Weakly Typed Property'/><title type='text'>Passing in a Weakly Typed Property to a Pipeline</title><content type='html'>Simply adding a property to the model's property bag is not enough if you wish to pass on some information down to the pipelines. Without having to create a full fledged strongly typed property, here is how you can pass in a weakly typed property to a pipeline. For this example, we will try and pass a OrderNumberPrefix property to the pipeline.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Changes to MetadataDefinitions.xml &lt;/strong&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Open the MetadataDefinitions.xml and look for the following tag:&lt;br /&gt;&lt;commerceentity name="Basket"&gt;&amp;lt;CommerceEntity name="Basket"&amp;gt;&lt;/li&gt;&lt;li&gt;Within this tag, locate the &amp;lt;PropertyMappings&amp;gt; &lt;propertymappings&gt;tag. &lt;/li&gt;&lt;li&gt;Add a new property inside this &lt;propertymappings&gt;tag as follows:&lt;br /&gt;&lt;propertymapping csproperty="OrderNumberPrefix" property="OrderNumberPrefix"&gt;&amp;lt;PropertyMapping property="OrderNumberPrefix" csProperty="OrderNumberPrefix"/&amp;gt;&lt;/li&gt;&lt;li&gt;Scroll further down within the same CommerceEntity tag for the basket, until you find the &lt;properties&gt;&amp;lt;Properties&amp;gt; tags. You will see all the properties listed here. Add the following tag within this &lt;properties&gt;tag:&lt;br /&gt;&lt;property name="OrderNumberPrefix" datatype="String"&gt;&amp;lt;Property name="OrderNumberPrefix" dataType="String"&amp;gt;&lt;br /&gt;&amp;lt;DisplayName value="OrderNumberPrefix"/&amp;gt;&lt;br /&gt;&amp;lt;/Property&amp;gt;&lt;/property&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Changes to Order.cs &amp;amp; PipelineConstants.cs&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Add the following public property to the PipelineConstants.cspublic const string OrderNumberPrefixField = "OrderNumberPrefix";&lt;/li&gt;&lt;li&gt;Open the Order.cs business entity class, and add a new public property called OrderNumberPrefix (just like the existing OrderNumber property). It will look something like this:&lt;br /&gt;public string OrderNumberPrefix&lt;br /&gt;{&lt;br /&gt;get { return GetValue&lt;string&gt;(PipelineConstants.OrderNumberPrefixField); }&lt;br /&gt;set { this[PipelineConstants.OrderNumberPrefixField] = value; }&lt;br /&gt;} &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;This just makes it easier for you to access the property in the pipeline. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Passing in the weakly typed property to the pipeline&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The last method that gets called when submitting an order is "AddBasketOrderSubmitRequest" inside the ShoppingController.cs. Add the following line inside this method: &lt;/p&gt;&lt;p&gt;update.Model.Properties["OrderNumberPrefix"] = SiteContext.Current.OrderNumberPrefix;&lt;/p&gt;&lt;p&gt;assuming your OrderNumberPrefix is coming from the site context. In theory, you could be retreiving it from wherever you like. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Retreiving the weakly typed property in the pipeline&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Within the execute method of your pipeline processor, after you populate the order object using the pdispOrder dictionary, you can simple access the new property as follows: &lt;/p&gt;&lt;p&gt;var order = new Order((IDictionary)pdispOrder);&lt;br /&gt;order.OrderNumberPrefix&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-1894230154563814999?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/1894230154563814999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=1894230154563814999' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/1894230154563814999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/1894230154563814999'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2009/09/passing-in-weakly-typed-property-to.html' title='Passing in a Weakly Typed Property to a Pipeline'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-633782371689961516</id><published>2009-07-17T13:14:00.002-04:00</published><updated>2009-07-17T13:33:13.485-04:00</updated><title type='text'>Profile MetaDataException</title><content type='html'>If you get an error of the following type:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;An exception of type 'Microsoft.Commerce.Providers.Metadata.MetadataException'&lt;br /&gt;occurred and was&lt;br /&gt;caught.&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;07/17/2009&lt;br /&gt;10:46:57&lt;br /&gt;Type : Microsoft.Commerce.Providers.Metadata.MetadataException,&lt;br /&gt;Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,&lt;br /&gt;PublicKeyToken=31bf3856ad364e35&lt;br /&gt;Message : Commerce Server class&lt;br /&gt;'Microsoft.CommerceServer.Runtime.Profiles.Profile' or its definition 'Something'&lt;br /&gt;is not found in the Commerce Server metadata.&lt;br /&gt;Source :&lt;br /&gt;Microsoft.Commerce.Providers&lt;br /&gt;Help link :&lt;br /&gt;Data :&lt;br /&gt;System.Collections.ListDictionaryInternal&lt;br /&gt;TargetSite :&lt;br /&gt;Microsoft.Commerce.Providers.Metadata.CommerceServerEntity&lt;br /&gt;GetCommerceServerEntity(System.String, System.String)&lt;br /&gt;Stack Trace : at&lt;br /&gt;Microsoft.Commerce.Providers.Metadata.MergedMetadata.GetCommerceServerEntity(String&lt;br /&gt;commerceClassName, String commerceDefinitionName)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Metadata.MergedMetadata.CreateMergedMetadata(CommerceEntityDelta&lt;br /&gt;repositoryСommerceEntityDelta, EntityMappingDelta repositoryEntityMapping)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Metadata.MergedMetadata.MergeMetadata(InheritableCollection`1&lt;br /&gt;repositoryMetadata, MetadataCollection`1 commerceServerMetadata)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Metadata.MergedMetadataLoader.GetMergedMetadata(String&lt;br /&gt;siteChannelKey, OperationCacheDictionary operationCache)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Metadata.MergedMetadataLoader.ExecuteQuery(CommerceQueryOperation&lt;br /&gt;queryOperation, OperationCacheDictionary operationCache,&lt;br /&gt;CommerceQueryOperationResponse response)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Components.OperationSequenceComponent.Execute(CommerceOperation&lt;br /&gt;operation, OperationCacheDictionary operationCache, CommerceOperationResponse&lt;br /&gt;response)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Broker.OperationSequence.ExecuteComponentTree(List`1&lt;br /&gt;executionTreeList, CommerceOperation operation, OperationCacheDictionary&lt;br /&gt;operationCache, CommerceOperationResponse response)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Broker.OperationSequence.Execute(CommerceOperation&lt;br /&gt;operation)&lt;br /&gt;at Microsoft.Commerce.Broker.MessageHandler.ProcessMessage(String&lt;br /&gt;messageHandlerName, CommerceOperation operation)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Broker.OperationService.InternalProcessRequest(CommerceRequest&lt;br /&gt;request)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Utility.CommerceEntityMetadata.ExecuteMetadataQuery(MetadataCacheKey&lt;br /&gt;cacheKey, String modelName)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Application.Common.CachedFactory`2.GetOrCreate(TKey key,&lt;br /&gt;CreateInstance`2 factory)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Utility.CommerceEntityMetadata.Get(String&lt;br /&gt;modelName, Nullable`1 commerceArea)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Utility.ProfileMetadata.&lt;&gt;c__DisplayClass5.&lt;get&gt;b__4(MetadataCacheKey&lt;br /&gt;key)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Application.Common.CachedFactory`2.GetOrCreate(TKey key,&lt;br /&gt;CreateInstance`2 factory)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Utility.ProfileMetadata.Get(String modelName)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.get_Metadata()&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.AreSearchParametersValid(CommercePropertyCollection&lt;br /&gt;properties)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.ValidateSearchCriteria(CommerceModelSearch&lt;br /&gt;searchCriteria)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.GetMatches(CommerceModelSearch&lt;br /&gt;searchCriteria, Nullable`1&amp;amp; totalItemCount, Boolean throwIfNotFound)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Components.ProfileLoaderBase.ExecuteQuery(CommerceQueryOperation&lt;br /&gt;queryOperation, OperationCacheDictionary operationCache,&lt;br /&gt;CommerceQueryOperationResponse response)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Components.OperationSequenceComponent.Execute(CommerceOperation&lt;br /&gt;operation, OperationCacheDictionary operationCache, CommerceOperationResponse&lt;br /&gt;response)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Providers.Components.ProfileOperationSequenceComponent.Execute(CommerceOperation&lt;br /&gt;operation, OperationCacheDictionary operationCache, CommerceOperationResponse&lt;br /&gt;response)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Broker.OperationSequence.ExecuteComponentTree(List`1&lt;br /&gt;executionTreeList, CommerceOperation operation, OperationCacheDictionary&lt;br /&gt;operationCache, CommerceOperationResponse response)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Broker.OperationSequence.Execute(CommerceOperation&lt;br /&gt;operation)&lt;br /&gt;at Microsoft.Commerce.Broker.MessageHandler.ProcessMessage(String&lt;br /&gt;messageHandlerName, CommerceOperation operation)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Broker.OperationService.InternalProcessRequest(CommerceRequest&lt;br /&gt;request)&lt;br /&gt;at&lt;br /&gt;Microsoft.Commerce.Broker.OperationService.ProcessRequest(CommerceRequest&lt;br /&gt;request)&lt;/span&gt;&lt;/blockquote&gt;A couple of things you may want to check are:&lt;br /&gt;&lt;br /&gt;1. Make sure the entity definition inside MetaDataDefinitions.xml is correct.&lt;br /&gt;3. Verify the entries into the Channel Config.&lt;br /&gt;2. If you have extended the Profile entity make sure that the changes you have made to the Profile Schema don't have any name mismatches. So open up Commerce Server Manager and make sure that the Profile Definition and the Data Object is named appropriately.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-633782371689961516?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/633782371689961516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=633782371689961516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/633782371689961516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/633782371689961516'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2009/07/profile-metadataexception.html' title='Profile MetaDataException'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-4599415345427678075</id><published>2009-01-01T13:06:00.010-05:00</published><updated>2009-01-01T13:49:38.070-05:00</updated><title type='text'>Creating and Accessing Site Terms through Mojave API</title><content type='html'>The purpose of this entry is to demonstrate how to access site terms through Mojave API.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;What is a Site Term?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;A &lt;strong&gt;&lt;em&gt;site term &lt;/em&gt;&lt;/strong&gt;is a set of valid values for information that the user provides. For example, if you added a custom property named "Gender" to the profile named "User," you could define a site term to represent the values "male" and "female," which would provide the valid values for the "Gender" property [1]. &lt;/p&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;How do you Create a Site Term?&lt;/span&gt; &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;There are several ways that you can create the site terms including direct user interaction with the Microsoft Commerce Server Customer and Orders management application. To do this, after opening the Customer And Orders management application, &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Click on "Site Terms" in the Views pane on the left hand side.&lt;/li&gt;&lt;li&gt;Click "Create New Site Term" in the Tasks pane.&lt;/li&gt;&lt;li&gt;Fill in the information in the window that pops up to create the new site terms. In the following screenshot we are creating a site term called Security Questions which will be used to hold the security questions that will be presented to the user upon account creation.&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_RgykukxegRQ/SV0JHmHZVEI/AAAAAAAAAA0/7LsrP-d4TZ8/s1600-h/Jan-1-2009.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5286391563698132034" style="CLEAR: left; MARGIN: 0px 10px 10px 0px; WIDTH: 320px; CURSOR: hand; HEIGHT: 240px" alt="" src="http://3.bp.blogspot.com/_RgykukxegRQ/SV0JHmHZVEI/AAAAAAAAAA0/7LsrP-d4TZ8/s320/Jan-1-2009.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;li&gt;Click "Save and Close" and you will have created a new site term in Commerce Server 2007.&lt;/li&gt;&lt;/ul&gt;If you wish, you could also create site terms through code. The purpose of this entry is to show you how you can bubble up existing site terms in your code through Mojave, so we will leave creating site terms through code for another time.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;Accessing Site Terms through Mojave API&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;So now that you have a site term, the next thing you want to do with it is to have access to it in your code. So you can actually reach into the Commerce Server boundary, extract this particular site term and show it in your UI, e.g. extract the security questions from the site terms and display it on your user registration page.&lt;br /&gt;&lt;br /&gt;If you are working with the default website that ships with the current Mojave download (CTP4, CTP5), one of the first things you need to do is to add a enumeration entry for your newly created site term. Inside the Common/DateItems folder you will find enums.cs which contains the definition for an enum called SiteTermName. This is simply an enumeration of the site terms that you have available inside Commerce Server. You can add your newly created site term to the bottom of this enum, and make sure that you spell it correctly as you did in the Commerce Server Customers and Orders management application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;color:#006600;"&gt;&lt;br /&gt;SecurityQuestions = 7&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The next thing you need to identify is that inside the ProfileController class, there is a method called GetSiteTerm, which takes an SiteTermName enum as a parameter, and returns a CommerceRelationshipList of the specific site term. By inspecting the code closely, you will see that this is done by creating a Commerce Query on the SiteTerm model, and passing in the Site Term Name as the model ID. This returns the entire contents of the site terms as a list.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;color:#006600;"&gt;&lt;br /&gt;public static CommerceRelationshipList GetSiteTerm(SiteTermName siteTermName)&lt;br /&gt;{&lt;br /&gt;CommerceRelationshipList siteTerms = new CommerceRelationshipList();&lt;br /&gt;CommerceQueryRelatedItem&lt;sitetermelement&gt; elementQuery = new CommerceQueryRelatedItem&lt;sitetermelement&gt;(SiteTerm.RelationshipName.Elements);&lt;br /&gt;elementQuery.Model.Properties.Add(SiteTermElement.PropertyName.Id);&lt;br /&gt;elementQuery.Model.Properties.Add(SiteTermElement.PropertyName.DisplayName);&lt;br /&gt;CommerceQuery&lt;siteterm&gt; query = new CommerceQuery&lt;siteterm&gt;();&lt;br /&gt;query.SearchCriteria.Model.Id = siteTermName.ToString();&lt;br /&gt;query.Model.Properties.Add(SiteTerm.PropertyName.Id);&lt;br /&gt;query.RelatedOperations.Add(elementQuery);&lt;br /&gt;CommerceResponse response = SiteContext.ProcessRequest(query.ToRequest());&lt;br /&gt;CommerceQueryOperationResponse queryResponse = response.OperationResponses[0] as CommerceQueryOperationResponse;&lt;br /&gt;SiteTerm st = queryResponse.CommerceEntities[0];&lt;br /&gt;if (st != null)&lt;br /&gt;{&lt;br /&gt;siteTerms = st.Elements;&lt;br /&gt;}&lt;br /&gt;return siteTerms;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So now you have a method that reaches inside the Commerce Server and grabs the Site Term you are interested in. All that remains is a call to this method. You may want to do this from say a helper class or the presenter itself. Here is a function that returns the Security Question site term contents:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;color:#006600;"&gt;&lt;br /&gt;public static CommerceRelationshipList GetSecurityQuestions()&lt;br /&gt;{&lt;br /&gt;return ProfileController.GetSiteTerm(SiteTermName.SecurityQuestions);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you like you can convert this CommerceRelationshipList into a keyed collection as you wish.&lt;br /&gt;&lt;p&gt;&lt;/p&gt;References:&lt;br /&gt;&lt;p&gt;1. &lt;a href="http://technet.microsoft.com/en-us/library/ms944910.aspx"&gt;What is a site term?&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-4599415345427678075?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/4599415345427678075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=4599415345427678075' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/4599415345427678075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/4599415345427678075'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2009/01/creating-and-accessing-site-terms-in.html' title='Creating and Accessing Site Terms through Mojave API'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_RgykukxegRQ/SV0JHmHZVEI/AAAAAAAAAA0/7LsrP-d4TZ8/s72-c/Jan-1-2009.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-8602100731685947854</id><published>2008-12-19T16:31:00.010-05:00</published><updated>2008-12-19T21:39:59.646-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Using &quot;Attach to Process&quot; when debugging Sharepoint applications on Microsoft Server 2008 IIS7 w3wp.exe'/><title type='text'>Debugging Sharepoint Applications in IIS7</title><content type='html'>&lt;div&gt;We all know how to debug classic ASP.NET application using the famous "Attach to Process" tool in our favourite IDE. However, when debugging sharepoint applications, you need to attach to the w3wp.exe thread. You will notice that you may have multiple w3wp.exe thread showing up in your Attach to Process window.&lt;br /&gt;&lt;br /&gt;How do you know which process to attach to. One dirty and long way to do is to set a breakpoint, and then attach each process one by one. If the breakpoint is a solid red, then you know that you got the right process. However, this is not the recommended way as there may be other reason why you may get a hollow red breakpoint icon. The symbols may not have been loaded yet, you may have missed a dll or two while GAC'ing between builds, etc.&lt;br /&gt;&lt;br /&gt;A better way to pinpoint which w3wp.exe process to attach to, use the following dos command:&lt;br /&gt;&lt;br /&gt;%windir%\system32\inetsrv\appcmd.exe list wp&lt;br /&gt;&lt;br /&gt;This is what the output would look like on a console:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_RgykukxegRQ/SUwWNa6aadI/AAAAAAAAAAs/YjoeNKEKXxA/s1600-h/Dec-19-2008.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5281620882817182162" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 158px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_RgykukxegRQ/SUwWNa6aadI/AAAAAAAAAAs/YjoeNKEKXxA/s320/Dec-19-2008.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;You can even throw this inside a batch file which gets called at the end of the a post-build event.&lt;br /&gt;&lt;br /&gt;Note that this is only applicable for servers running IIS7. Previous IIS versions had a different tool called iisapp.vbs which is no longer available with IIS7.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-8602100731685947854?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/8602100731685947854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=8602100731685947854' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/8602100731685947854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/8602100731685947854'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2008/12/using-attach-to-process-when-debugging.html' title='Debugging Sharepoint Applications in IIS7'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_RgykukxegRQ/SUwWNa6aadI/AAAAAAAAAAs/YjoeNKEKXxA/s72-c/Dec-19-2008.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-6423602614838164820</id><published>2008-12-19T16:17:00.002-05:00</published><updated>2008-12-19T16:30:48.305-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sorting Profile in Commerce Server 2007 and Mojave'/><title type='text'>Sorting Profile in Commerce Server 2007 and Mojave</title><content type='html'>At the time of this writing sorting is not supported by Mojave on the Profile entity. As a matter of fact, if you write and execute a Mojave query, the sortProperties attribute will only have any effect if you are dealing with one of the following entities:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Catalog&lt;/li&gt;&lt;li&gt;CatalogEntity&lt;/li&gt;&lt;li&gt;Category&lt;/li&gt;&lt;li&gt;Product&lt;/li&gt;&lt;li&gt;Variant&lt;/li&gt;&lt;/ul&gt;The CommerceSortProperty will simply be ignored for any other entities including Profile.&lt;br /&gt;&lt;br /&gt;So how exactly do you sort one of these entities? Well, not surprisingly, you will have to do it yourself. For example, if you run a query to get the credit cards from the user profile, the returned list will be random at best. Typically, you will store this result inside a Collection object of some sort. The DefaultSite that ships with CTP4, uses a generic Collection object called Collection&lt;creditcard&gt;. Before you return this unsorted list to your caller, you can send this object to the following method which will sort it for you.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;private static ICollection&lt;creditcard&gt; SortCreditCardsCollectionByDateCreated(Collection&lt;creditcard&gt; creditCardsCollection)       &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;List&lt;creditcard&gt; listCreditCards = new List&lt;creditcard&gt;(creditCardsCollection);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;listCreditCards.Sort(&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;  delegate(CreditCard x, CreditCard y)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;    { return DateTime.Compare(x.DateCreated, y.DateCreated); }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;return (new Collection&lt;creditcard&gt;(listCreditCards));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above method sorts the list on the DateCreated attribute. You can take it one step further and generalize this method to actually pass in the attribute on which you wish to sort, and place it in a MojaveUtilities class if you wish.&lt;br /&gt;&lt;br /&gt;And now, you can sort profile or any other entity you wish to sort in Commerce Server 2007 using Mojave API.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-6423602614838164820?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/6423602614838164820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=6423602614838164820' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/6423602614838164820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/6423602614838164820'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2008/12/sorting-profile-in-commerce-server-2007.html' title='Sorting Profile in Commerce Server 2007 and Mojave'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-6358610099189432298</id><published>2008-12-19T16:07:00.004-05:00</published><updated>2008-12-19T21:40:34.327-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Refreshing Cache from Mojave Code Caching in Commerce Server 2007'/><title type='text'>Refreshing Cache from Mojave API</title><content type='html'>My last post was regarding how to refresh CS07 cache concerning the web services. It is important to note however that when you are dealing with Mojave code, such as working on the Default Site that ships with CTP4 (or upcoming CTP5), that the code does not use these web services. These web services are used by integration applications (e.g. Biztalk) or the management application MMCs (e.g. Customers and Orders Manager, Catalog Manager, etc.).&lt;br /&gt;&lt;br /&gt;One example would be when you a user adds a credit card to his profile. A new credit card entry is created which includes all the information e.g. credit card number, expiry date, etc. However, it does not include the DateCreated i.e. the time stamp at which the user created the credit card entry on the site. This attribute is filled in on the Commerce Server/Sql Server side. Therefore your local cached copy of the newly created credit card will not have DateCreated attribute in the cache. Why is this a problem? Well, if you want to sort the credit cards by DateCreated attribute, this is a problem. You will not be able to do a meaningful sort until and unless the CS07 cache refreshes. An iisreset, for example, will clear the cache for you. Note that resetting the cache from the management applications or changing the settings in the Commerce Server web services' web.config will have no effect. Remember, you are making Mojave calls which are going straight to CS07 (Microsoft.CommerceServer.* libraries). The web services are simply not in the play here.&lt;br /&gt;&lt;br /&gt;So, how do you refresh Commerce Server 2007 cache from Mojave API? There are two ways:&lt;br /&gt;&lt;br /&gt;1. Directly Using CommerceUpdate&lt;commercecache&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;color:#009900;"&gt;CommerceUpdate&lt;commercecache&gt; updateCache = new CommerceUpdate&lt;commercecache&gt;();&lt;br /&gt;updateCache.SearchCriteria.Model.Name = "ProfileCache";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;color:#009900;"&gt;CommerceResponse response = OperationService.ProcessRequest(GetCurrentRequestContext(), updateCache.ToRequest());&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. When a CommerceQuery&lt;userprofile&gt; is done. If the search criteria contains the last modified date, it will be evaluated against the retrieved user profile and if different, the CS2007 cache will be refreshed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;color:#009900;"&gt;CommerceQuery&lt;userprofile&gt; query = new CommerceQuery&lt;userprofile&gt;();&lt;br /&gt;&lt;strong&gt;query.SearchCriteria.Model.DateModified = DateTime.UtcNow;&lt;/strong&gt;&lt;br /&gt;query.SearchCriteria.Model.Email = email;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-6358610099189432298?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/6358610099189432298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=6358610099189432298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/6358610099189432298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/6358610099189432298'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2008/12/refreshing-cache-from-mojave-code-more.html' title='Refreshing Cache from Mojave API'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-9211628293107751308</id><published>2008-12-17T11:51:00.008-05:00</published><updated>2008-12-19T21:41:14.846-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Refresh Cache Commerce Server 2007 SiteCacheRefresh.axd ProfileCache'/><title type='text'>Refreshing Cache in Commerce Server 2007</title><content type='html'>Commerce Server heavily reiles on caching to keep the application flowing nice and tidy. During development, there may be cases where you want the application to go and fetch data right from the source and bypass the cache. There are a couple of things you can do:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;From the management applications, e.g. Commerce Server Customers and Order manager, you can click on the Profiles or Payment Methods, and then click "Refresh Site Cache" from the task pane.&lt;a href="http://1.bp.blogspot.com/_RgykukxegRQ/SUkvEfOImeI/AAAAAAAAAAc/TE44Rd1Fvd4/s1600-h/Dec-17-2008.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5280803792215382498" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 203px; CURSOR: hand; HEIGHT: 320px; TEXT-ALIGN: left" alt="Commerce Server - Refresh Cache" src="http://1.bp.blogspot.com/_RgykukxegRQ/SUkvEfOImeI/AAAAAAAAAAc/TE44Rd1Fvd4/s320/Dec-17-2008.jpg" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;You can browse to the following URL: &lt;a href="http://webserver:webservicesPort/OrdersWebService/SiteCacheRefresh.axd?CacheToRefresh=ProfileCache"&gt;http://webserver:webservicesPort/OrdersWebService/SiteCacheRefresh.axd?CacheToRefresh=ProfileCache&lt;/a&gt; (replace ProfileCache with whichever cache you are trying to refresh).&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you get an access denied error, then you need to add the owner of your application pool to the appropriate section in the web.config of the web services. Look for "SiteCacheRefresh.axd" in your web service's web.config and it will have "&lt;deny users="*"&gt;". In that section allow access to your application pool owner, or (for development box only) change "deny" to "allow" in the above tag giving everyone free access. &lt;/li&gt;&lt;/ol&gt;Here is a great link on How to Control the Profile Cache in Commerce Server: &lt;a href="http://blogs.msdn.com/maxakbar/archive/2007/02/07/how-to-control-the-profile-cache.aspx"&gt;http://blogs.msdn.com/maxakbar/archive/2007/02/07/how-to-control-the-profile-cache.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-9211628293107751308?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/9211628293107751308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=9211628293107751308' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/9211628293107751308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/9211628293107751308'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2008/12/refreshing-cache-in-commerce-server.html' title='Refreshing Cache in Commerce Server 2007'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_RgykukxegRQ/SUkvEfOImeI/AAAAAAAAAAc/TE44Rd1Fvd4/s72-c/Dec-17-2008.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-2257536004300836700</id><published>2008-12-16T08:38:00.003-05:00</published><updated>2008-12-16T09:10:25.568-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XCOPY Commerce Server Hive Flat Recursive Copy'/><title type='text'>Tree-To-Flat Copy Using XCopy</title><content type='html'>If you have a tree folder as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="font-family:courier new;font-size:85%;color:#000000;"&gt;%BRANCHPATH%\UserControls&lt;br /&gt;%BRANCHPATH%\UserControls\ChangePassword\&lt;br /&gt;%BRANCHPATH%\UserControls\MyProfile\&lt;br /&gt;%BRANCHPATH%\UserControls\RegistrationWizard\&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;and you try to do a XCOPY as follows using the recursive option (/S), it copies entire folder structure into the target hive.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;color:#ff0000;"&gt;XCOPY %BRANCHPATH%\*.ascx "%HIVE%" /Y /R /S &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;However, if we just want to drop the files individually the above doesn’t work. The above will copy entire folders that contain the ascx files in the HIVE. This will cause problems. There is no way to do a tree-to-flat copy using any XCopy option.&lt;br /&gt;&lt;br /&gt;One easy but cumbersome way to avoid this is to use full paths to each folder as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="color:#cc6600;"&gt;XCOPY %BRANCHPATH%\UserControls\*.ascx "%HIVE%" /Y /R&lt;br /&gt;XCOPY %BRANCHPATH%\UserControls\ChangePassword\*.ascx "%HIVE%" /Y /R&lt;br /&gt;XCOPY %BRANCHPATH%\UserControls\MyProfile\*.ascx "%HIVE%" /Y /R&lt;br /&gt;XCOPY %BRANCHPATH%\UserControls\RegistrationWizard\*.ascx "%HIVE%" /Y /R&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The above will work, but you will have to specify each folder, and there may be a folder you end up missing. However, the following snippet is generic enough in that it will first create a list of all the folders and subfolders, create a temporary list of folders in a text file, go through each folder, grab the .ascx files in each folder and copy it to the HIVE. At the end delete the temporary text file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;color:#009900;"&gt;dir %BRANCHPATH%\UserControls /A:D /B /S &gt; tempListOfDirs.txt&lt;br /&gt;For /F %%A IN (tempListOfDirs.txt) Do (&lt;br /&gt;If Exist %%A* (&lt;br /&gt;XCOPY %%A\*.ascx "%HIVE%" /Y /R&lt;br /&gt;)&lt;br /&gt;)&lt;br /&gt;del tempListOfDirs.txt&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-2257536004300836700?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/2257536004300836700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=2257536004300836700' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/2257536004300836700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/2257536004300836700'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2008/12/tree-to-flat-copy-using-xcopy.html' title='Tree-To-Flat Copy Using XCopy'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-502975161986876764</id><published>2008-12-15T14:29:00.000-05:00</published><updated>2008-12-16T08:44:46.072-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Automatic TFS Sign-in on Microsoft Server 2008 User Profile Manage Network Passwords'/><title type='text'>Automatic TFS Sign-in on Microsoft Server 2008</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_RgykukxegRQ/SUaw-K3fMHI/AAAAAAAAAAU/XwjlVx_DvJQ/s1600-h/Dec-15-2008.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5280102195253948530" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 273px; CURSOR: hand; HEIGHT: 320px" alt="" src="http://4.bp.blogspot.com/_RgykukxegRQ/SUaw-K3fMHI/AAAAAAAAAAU/XwjlVx_DvJQ/s320/Dec-15-2008.jpg" border="0" /&gt;&lt;/a&gt;Do the following so VS doesn’t bother you each time for logging in when you fire it up. Note that if you want to log on using another ID, you will have to go back here and remove the cached password from the entry. These are instructions for Microsoft Server 2008.&lt;br /&gt;&lt;br /&gt;Control Panel &gt; User Accounts &gt; Manage Your Network Passwords&lt;br /&gt;&lt;br /&gt;Click Add&lt;br /&gt;&lt;br /&gt;Enter information as below with your username and password. Note that you won’t have the options grayed out – mine are grayed out because I am trying to edit an existing property. You will be able to type in the log on box (enter your tfs server name e.g. tfs.companyname.com) and choose the radio button.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-502975161986876764?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/502975161986876764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=502975161986876764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/502975161986876764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/502975161986876764'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2008/12/automatic-tfs-sign-in-on-microsoft.html' title='Automatic TFS Sign-in on Microsoft Server 2008'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_RgykukxegRQ/SUaw-K3fMHI/AAAAAAAAAAU/XwjlVx_DvJQ/s72-c/Dec-15-2008.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6011393917265969473.post-6527028107479884205</id><published>2008-12-09T15:52:00.000-05:00</published><updated>2008-12-09T15:55:28.358-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Commerce Server Mojave Newbie Learning'/><title type='text'>Welcome to Commerce Server Guy</title><content type='html'>I am a Microsoft Commerce Server newbie. I will be working with the latest MS offering codenamed Mojave at my current place of employment. As I get more familiar with this product, the purpose of this blog is to share any development experiences and other teething pains to hopefully help someone else out there get up to speed quickly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6011393917265969473-6527028107479884205?l=commerce-server-guy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://commerce-server-guy.blogspot.com/feeds/6527028107479884205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6011393917265969473&amp;postID=6527028107479884205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/6527028107479884205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6011393917265969473/posts/default/6527028107479884205'/><link rel='alternate' type='text/html' href='http://commerce-server-guy.blogspot.com/2008/12/welcome-to-commerce-server-guy.html' title='Welcome to Commerce Server Guy'/><author><name>Commerce Server Guy</name><uri>http://www.blogger.com/profile/13983823329676171475</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
