Navigation


Upcoming courses:

  • Aarhus, Denmark, March 5 - 9, 2012
  • New York City, USA, March 26 - 30, 2012
Read more on our website

About me

Brian Holmgård Kristensen

Hi, I'm Brian. I'm a Danish guy primarily working with ASP.NET e-commerce solutions using Microsoft Commerce Server.

I'm co-founder and core-member of Aarhus .NET Usergroup (ANUG), which is a offline community for .NET developers in Denmark.

You can visit my View Brian Holmgård Kristensen's profile on LinkedIn or follow me on Twitter @brianh_dk. Also please feel free to contact me via e-mail Send me an e-mail.

Categories

On this page

Building Complete Web Application using ASP.NET 3.5 & Visual Studio 2005 Part 1
Eating your own software, Keynote from TechEd Developers 2007
Getting ready for this years TechEd Keynote speaking
Arrived at TechEd Developers 2007, Barcelona
My Sessions of interests, TechEd Developers 2007
I have passed my first exam
Very cool Commerce Server training with Max Akbar
Upgraded to dasBlog 2.0
Planning Microsoft Certified Technology Specialist (MCTS) certification
Refresh Catalog FullText Index causes search operations to fail
Commerce Server: Search exception on web-site when adding new property

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0

Send mail to the author(s) E-mail

Total Posts: 36
This Year: 0
This Month: 0
This Week: 0
Comments: 10

Sign In

Follow me on Twitter @brianh_dk
 Tuesday, 06 November 2007

I attended this session to get an overview on some of the new features in Visual Studio 2008 and hopefully learn some tips and tricks from that. And I did :-)

The speaker of this session was Omar Khan, Group Program Manager of Visual Studio, who did a convincing and stable speech on his part one of two presentations of "Building Complete Web Application using ASP.NET 3.5 & Visual Studio 2008".

Omar started out by showing the new Multi-targeting feature of Visual Studio 2008, allowing the development of any .NET 2.0, 3.0 or 3.5 application in Visual Studio 2008. It is possible to specify which .NET Framework version the application targets which automatically gets reflected in the IDE by switching features on/off. An example of this is that the available list of controls in the toolbox gets extended when targeting an ASP.NET 3.5 web application rather than an ASP.NET 2.0 version. It is a pretty useful feature that makes it a no-breeze to continuously develop our .NET 2.0 solutions in .NET 2.0 but then use the newest IDE available and leverage from its new features and benefits. And all this without having to upgrade the complete solution to the newest version of the .NET Framework as we had to when Visual Studio 2005 was shipped. Omar actually showed us how an ASP.NET 2.0 application was easily upgraded to ASP.NET 3.5, where Visual Studio goes and updates the web.config and adds some new assembly references including LINQ. Sadly I did not manage to found out whether it is possible to upgrade applications from .NET 1.x.

Moving on Omar showed us some more new features of Visual Studio 2008 with focusing on the HTML Designer. This has been improved and it uses the same WYSIWYG designer engine as in Expression Web, meaning that you don't have to worry about pasting any HTML delivered by your designer working in Expression Web causing Visual Studio to change the markup of this and vice versa. They have also done some work on improving the performance between View Switching, and they have now included support for nested MasterPages. In Visual Studio 2005 having nested MasterPages is not completely useful as the IDE do not support to render this, so now having this in Visual Studio 2008 is really exciting. With Visual Studio 2008 they have introduced a common feature called Split View, that is splitting the view between the markup that you write and the design that it produces. A feature seen for ages in many other products but until now not supported by Visual Studio. I should have asked Omar whether it is possible to dock the design-view on another physical screen having the full benefit of two monitors - but I didn't  - so I just need to check it out for myself (I don't think you can actually).

Another thing that Omar used a lot of time talking about was the new enhanced support of Cascading Style Sheets (CSS) in Visual Studio 2008. They have really put a lot of effort in providing a confident and fine grain control over the markup. From what I saw from his presentation, it really looks as they have succeeded in that. I have always been avoiding using the designer view because this typically meant that Visual Studio went ahead and created all kinds of inline CSS on my elements, which lead me to do all the work on that. I don't see however how this supports ASP.NET Themes, as they can be changed and applied runtime for your web-site, leading the IDE without any knowledge of the actually applied style - but I think that goes for all scenarios where the runtime can change the behavior that the designer in Visual Studio has no clue about. I need to dig a little more into this to fully understand it, but I really welcome the enhanced support of CSS in Visual Studio 2008.

The final topic on this part 1 of the session was how to work with data. Omar went, not surprisingly, into the world of LINQ, showing a demo of LINQ To SQL as an ORM provider for his Web Application. He generated the DataContext class by dragging tables from the NorthWind database to his web-site project - unfortunately all his LINQ code was placed in a inline code block of his ASP.NET WebForm leaving me a bit disappointed as the topic for the session was to build a "complete web application" having to think that we would see at least semi-structured code and not this kind of spaghettish-code. Luckily enough Omar pointed that out himself saying that he would refactor this in the part two of the session implementing an actual data access layer. With that said I could again relax and enjoy the show!

Omar showed some features of LINQ, including aggregating, Lambda Expressions, server-side paging and the use of partial classes to implement validation logic to the generated LINQ classes.

I'm looking forward to part two of his session where Omar hopefully, as promised, will structure his code in a more architectural right way and to learn more about new controls introduced in ASP.NET 3.5.

Below are some photos from the session with Omar Khan:

IMG_1396IMG_1398

Posted on Tuesday, 06 November 2007 08:15:39 (Romance Standard Time, UTC+01:00)
# | Comments [0]

This was actually not the headline from the keynote by S. Somasegar, the Microsoft Corporate Vice President of the Developer Division, who was the keynote-speaker at this years TechEd Developers 2007 conference in Barcelona. The headline however is from a funny part of the keynote where S. Somasegar plays a video from Microsoft on how they build Visual Studio 2008.

With a totally packed Auditorium of expectant developers S. Somasegar started out his keynote speech by telling a true story of an experience he had here in Barcelona after arriving. It took place in a restaurant called “Moo Restaurant” where he had had the absolute best dinner experience in a longer time. He told us that it was a combination of two things; 1) that the chef did a fantastic job cooking the dinner, and 2) that the ambience and the way the food was served, really met his expectations and then some. In software perspective he did the analogy that being a fantastic developer is not enough when failing to have an understanding of the differentiated user experiences and requirements that users have. Otherwise the software won’t survive in the longer run.

S. Somasegar also shared some statistics with us; that over the last two years, there have been over one million professional developers using Visual Studio 2005 where 25 percent of these use Team System in development, that there have been over 17 million downloads on the Visual Studio Express product and last that 80 percent of all questions asked on the MSDN forum have been answered.

Offering a free license to a feature-limited Visual Studio IDE, the Express editions, is available to make it easy for anyone to getting started on learning how to develop applications. I really like the idea of having these free feature-limited editions of Visual Studio and SQL Server as this helps getting as many people as possible joining the community. Another effort that his division has done is to increase/strengthen the community by making the MSDN much better. On the forums they have done a lot to improve response time on questions. Also with the Microsoft Valuable Professional (MVP) Program it can really pay off being an active community member. I hope to find myself struggling for that title someday – but as for this moment I have other things to focus on. Upcoming improvements to MSDN is the possibility to share code, which makes it easy for developers to share work with the rest of the world, and also a new MSDN Wiki lets community members add more content to the documentations. These new things will help transition MSDN from a one-way platform to a community-based platform. Really great news from my point of view.

S. Somasegar went on speaking some about the Mission of his division, which he stated being to: Make every software project successful with Microsoft tools & platforms.

He wants to do this by constantly deliver platform technologies and tools that support different developers with different experiences for different projects. LINQ is one of the technologies to accommodate that. LINQ makes it easier for developers to execute data queries without having to know anything about e.g. SQL, XPath and/or XSLT. The developer simply just makes the queries in his own .NET language e.g. C# or VB.NET. A lot of sessions on this years TechEd will be on LINQ with some I will be attending.

S. Somasegar told us that Microsoft Patterns & Practices have just released (or are about to release) some blueprints for Software plus Services solutions (S+S), which should make it very easy to take an application and make it serviceable. The releases will contain ready to use building blocks and plug-ins for Visual Studio. Blueprints are frameworks with source code and will target different scenarios. There will be more blueprints to be published during the next couple of months. It is something that I haven’t heard about until know, but it sounds very cool and something that I will definitely check out.

After that, Tony Goodhew, Product Manager of Visual Studio was brought to the stage for a demo on how to build great applications with Visual Studio 2008. He quickly demonstrated some of the new features in the IDE including the Split View feature between markup and design when creating ASP.NET solutions and the enhanced support for Cascading Style Sheets (CSS). He also showed how Visual Studio 2008 can target different versions of the .NET framework (2.0, 3.0 and 3.5), making it no excuse to not using Visual Studio 2008 on your .NET 2.0 solutions (and why shouldn’t you?). He showed us something that for me was new; extended support for JavaScript in the IDE which included support of debugging with breakpoints – that is pretty cool. Tony also showed us a fictional customer case of having workflows in SharePoint with a typical sequential Vendor Approval Workflow. This workflow included a Vendor Application word-document, with a custom Microsoft Office add-in dialog, which had WPF hosted inside an ElementHost control on this dialog. The ElementHost control supports two-way interop and it is there to host the right technology in the right place which was very well and convincing demoed in this case.

After the demo by Tony Goodhew we moved on to the funny video I was mentioning in the start of this text. S. Somasegar put on the video: “Visual Studio 2008: True Development Story”, which was had a sort of X-Files (or “Operation X” as we have a Danish documentary series called) kind of theme/atmosphere over it. It had this Professor commenting on the state from Microsoft that in the development of their Visual Studio 2008 they have been using their own product to build their own product – the professor compared that to his new book “Eating your own dog-food”, and even moved things a step further introducing the sequel “Eating your own dog-food even before you even have a dog” stating that it was too good to be true that such thing could occur. It was a great video and had Scott Guthrie in it. Scott is one of the Microsoft folks that I pay especially attention to by subscribing his blog-posts. The moral of the video did all go well with the philosophy that S. Somasegar stated in the speech: "Use what we ship, ship what we use".

We then had a demo on Visual Studio Extensibility by Dan Fernandez, the Lead Product Manager of Visual Studio, who showed us an Add-On Studio to the famous game World of Warcraft. Basically he had built his own custom IDE using Visual Studio and used it to create an add-on to World of Warcraft with Intellisense support to a custom .NET language that converts to what I think he called the LUA data structure which the game is based on – or at least something very close to that.

The new add-on to the game he demoed was an in-game screen dialog showing some info from the opponent creatures that he was attacking (or something like that – I haven’t played the game), and when he killed his opponents a MP3 file was played. It was pretty funny to see Dan walk around with his wife’s character in the World of Warcraft universe; slaughtering creatures and when doing so, a “Killimanjaro” sound was played when the third opponent was killed (this was actually the logic of the small code sample that he showed us – killing three opponents should result in playing this special MP3 file).

Dan Fernandez also did the final demo when he announced the new Microsoft Popfly. Popfly is an online web-based platform where you can share and publish web-pages with the rest of the world. The development can take place in Visual Web Developer Express and you can find a lot of Silverlight prebuilt templates/gadgets on Popfly to drag to your own page, or share your own. Popfly will make it easier for anyone to create a nice and cool-looking web-site, or at least that was the experience he brought from the presentation. He demoed a World of Warcraft fan web-site, and even so that it was a very quick presentation, Popfly seems to be very promising as they have made it easier for none-developers to create very cool web-sites, with the use of innovative products and technologies such as Visual Studio and Silverlight.

S. Somasegar finished off the keynote by telling us what is coming down the pipe from Microsoft. We got some insights on the future roadmap, which includes Expression Studio 2, Visual Studio 10, Silverlight vNext, .NET Framework 4.0, Windows Server 2008, Internet Information Services 7.0, SQL Server 2008 and BizTalk Server R6 – where some of the mentioned products/platforms are sooner to be released than others. He also gave us some detailed insight on the next version of Visual Studio Team System, codename “Rosario”, where the key themes for the product are; 1) enabling us to built the right thing the right way - being able to have a rich way to prioritize features with deep level integration between Project Server and Team Foundation Server, and 2) having the testing tools being more comprehensive than they are today, including support of test case management, manual testing, stress testing, load testing, code analysis testing etc.

Although he sometimes was a bit hard to understand due to strong dialect it was all in all a very good and informative keynote with cool demos and a funny video, but most important of all it was a nice kickoff to TechEd Developers 2007 which hopefully will contain lots of cool sessions! More on that as I go along. Stay tuned.

(Sorry about the long post - and most likely possible misspelling)

Posted on Tuesday, 06 November 2007 08:09:51 (Romance Standard Time, UTC+01:00)
# | Comments [0]
 Monday, 05 November 2007

I am sitting here practically live from TechEd Barcelona, in a crowded auditorium waiting for S. Somasegar, the Microsoft Corporate Vice President of the Developer Division, to do this years keynote speaking.

While waiting we have two graffiti painters and a DJ pumping some really cool techno music out to entertain us.

I just wanted to share some pictures with you, and then I'm off again.

IMG_1388

IMG_1386

IMG_1387

Posted on Monday, 05 November 2007 13:38:53 (Romance Standard Time, UTC+01:00)
# | Comments [0]

I'm here!! Sitting at the TechEd Developers conference in Barcelona :-)

The traveling however did not go as expected, due to a delayed plane in Kastrup, some confusing bus- and train rides in Barcelona (I wished that Microsoft had been there to pick me up in the Airport) and a hotel receptionist who couldn't find my reservation. But hey, that doesn't matter anymore - I'm here now, have had a good nights sleep, and that is all that counts :-)

I'm sitting this moment on-site at the conference, and I have now decided which sessions that I will be going to attend for today:

WEB303 - Building a Complete Web Application Using ASP.NET "Orcas" and Microsoft Visual Studio 2008 (Part 1 of 2)
by Omar Khan

TLA318 - The .NET Language Integrated Query (LINQ) Framework
by Luca Bolognese

Well I'm off again - I want to check this place out and most likely do some Hands-on Labs on VS.NET 2008 and LINQ before the sessions.

Posted on Monday, 05 November 2007 09:12:42 (Romance Standard Time, UTC+01:00)
# | Comments [0]
 Tuesday, 30 October 2007

With only a few days to the kick-off of the TechEd Developers conference in Barcelona I have been doing some preparation in order to try and get the most out of the days there as possible.

Below is a list of some of the (in my opinion) most exciting and interesting sessions. And I would really like to attend them all, however this is quite impossible because of overlaps in them. There is really nothing to do about that other than trying to prioritize between them.

SBP207

What is Next for the .NET Framework and Distributed Applications? 

ARC202

Agile Development with Team System 

WIN303

.NET Framework 3.5 End-to-End: Putting the Pieces Together - Part 2 

WEB305

"IronPython" and Dynamic Languages on .NET

LNC01

Why Software Sucks

DAT312

Programming SQL Server 2008 

TLA312

Microsoft Visual C# Under the Covers: An In-Depth Look at C# 3.0

ARC06-IS

Exploring Event Driven Architectures

DAT315

T-SQL Querying: Tips and Techniques

DAT201

Entity Framework Introduction

WEB401

Building Highly Scalable ASP.NET Web Sites by Exploiting Asynchronous Programming Models

TLA10-IS

Unit Testing Tips and Techniques with Visual Studio 2008 and the .NET Framework

TLA304

Building Services with the Service Factory: Modeling Edition

LNC02

Communities? Can They Really Help My Business, My Day-to-Day Job, and My Career?

TLA326

LINQ to Entities – Use LINQ to access ADO.NET Entity Data Models

WEB02-IS

Top Ten ASP.NET Scaling Tips

TLA307

Improving Code Performance with Microsoft Visual Studio 2008 Team Edition for Software Developers 

WEB308

Hidden Gems in ASP.NET 2.0

WEB01-IS

ASP.NET: Why, What, How and When?

TLA310

Manual and Dynamic Mocks with C# and Visual Studio Team System

WEB08-IS

Building Languages With The Dynamic Language Runtime

WEB310

WEB310   The Next Release of ASP.NET – Significant Features Available Soon… (really soon)

ARC401

Designing High Performance, Persistent Domain Models

TLA06-IS

LINQ to “X”, ADO.NET Entity Framework, DataSets & Co – What is it with all these Data Access Technologies?

WEB316

Understanding ASP.NET Internals

WEB201

Web Application Security

WEB306

Building Multi-Channel E-Commerce Solutions with Commerce Server 2007, ASP.NET, AJAX, Silverlight, WPF, SharePoint and BizTalk Server

TLA402

Hardcore Production Debugging of .NET Applications

TLA319

The Joins Concurrency Library (Cω in a Box)

TLA405

Parallel and Asynchronous Functional Programming on .NET with F#

WEB04-IS

ASP.NET Model View Controller (MVC)

WIN304

Framework Engineering: Architecting, Designing, and Developing Reusable Libraries

TLA09-IS

The Near Future of Programming is All About Concurrency – But What do Technologies such as F# and the Joins Library Mean for Developers?

WEB403

Securing your High-Risk ASP.NET Web Applications: A Case Study

My focus will primarily be on the Web Development track as this is most related to my daily work with eCommerce solutions and also extremely interesting to me. But also especially the Architecture track and the Tools & Languages track appeals to me. Here goes links to the complete list of Technical Tracks and Session Search Tool on the TechEd homepage.

My TechEd journey starts early on Sunday, starting out with a couple of hours in the train from Aarhus to Copenhagen Airport. I will arrive in Barcelona after a intermediate flight-stop in Zürich.

Ohh and by the way... please remember to keep an close eye to this blog during the days of TechEd as I plan to write a lot of posts from it!

Waou - I'm so exited :-)

Posted on Tuesday, 30 October 2007 21:52:54 (Romance Standard Time, UTC+01:00)
# | Comments [0]
 Thursday, 25 October 2007

First let me point out: I know it has been a while since my last post. I will try to get some more posts done in the future and I have already some in the line-up including:

  • Extending Commerce Server 2007 Payment and Shipping Methods
  • Disable "Requires Question and Answer" option in Commerce Server 2007
  • Being part of a sparkling new .NET Usergroup (www.anug.dk / Sørens blog posts)

Some time ago I wrote a post about my upcoming education strategy including a MCTS Web Developer certification. This certification takes two exams and I'm very happy to announce that I have now completed the first of the two exams. I have passed the Exam 70–536: TS: Microsoft .NET Framework 2.0 - Application Development Foundation. My score on the test was 806 points with a passing score of minimum 700 points.

The complexity level of the test took me a little by surprise - or maybe I was not enough prepared, however I think the test was harder than I had imagined. But that is not a bad thing - that only encourages me to study harder for my next exam, 70-528, approximately coming up by week 49 (December).

A small hint about the exam is that a good thing to master completely is the globalization/localization stuff in the .NET Framework, a lot of questions in my test was regarding that, so classes like CultureInfo, RegionInfo, NumberFormatInfo, CompareInfo, Calender etc. are worth looking at.

Next event for me is the upcoming TechEd Developers 2007 in Barcelona. I'm very excited about it and I will soon post a list of some of the sessions that I properly will attend. Also Microsoft Denmark has announced that they will be holding a 'Country Evening Party', a night-out for the Danish attendees which I'm really looking forward to.

Posted on Thursday, 25 October 2007 18:57:05 (Romance Standard Time, UTC+01:00)
# | Comments [0]
 Thursday, 06 September 2007

My first experience with Microsoft Commerce Server was in May 2007 when I started working at Vertica. At that point I had absolutely no clue of what Commerce Server could leverage as a standard eCommerce platform. The first few weeks basically went by doing training based on some internal training material and the documentation on MSDN for Commerce Server. Soon after that I became team member on a Commerce Server project for one of our customers. Since then my work has been more or less exclusively to this project which have been a incredible educational experience for me.

Moving on to my point it had been planned for some months that we should have Max Akbar, former Program Manager for the Microsoft Commerce Server Team, come to our company location in Aarhus and provide us some technical training on Commerce Server. At that time I had only read some of Max' posts about Commerce Server but honestly I did not knew much about who he was or what he had do with the Commerce Server product. But as I got to learn more about Commerce Server and began digging more and more into the technical aspects of the product, in purpose of extending and modifying it to our customer needs, Max' name and posts appeared more frequently on the web-sites I came along. Also he had posted some very useful articles on his blog that really helped me a lot doing the development. So it was very great news that he would come to our company, and I was really looking forward to meet him and none the less learn from him.

So this week we had Max coming all the way from California, USA to Aarhus, Denmark to spend a couple of days with us giving in-house training on the Commerce Server 2007 product. Although Max suffered a bit jetlag from his flight there were no way to tell it because he really pulled off some very intensive training and the level of expertise was just stunning! The experience and in-depth knowledge with the Commerce Server product was absolutely remarkable. I really enjoyed attending the course with Max and it fully lived up to my expectations - and then some.

This blog post doesn't cover all the topics that we went through the training with Max, but hopefully it gives a resume of what went on. The first day we got around talking about the installation, architecture and security stuff of Commerce Server as well as giving us some insight on some of the work he had been doing at Microsoft and some of the large scale enterprise solutions he have been a part of. It was very exciting to hear about all that. The second day we learned a lot about the CSS - Commerce Server Staging on how to easily deploy Commerce Server business data and content between different environments. It was very cool to learn about because the CSS part of Commerce Server is one thing that I have none on-hands experience with nor much knowledge about. We also got through the Catalog-, Profiles- and Marketing systems which gave me some very good insight on how this is implemented in the product and how to best interact with the systems. After the second day of training most of us from Vertica went out with Max to grap a beer on Kafé Komma and later we all went to eat on a really good restaurant. The third and last day of the training was primarily focused on integration, extending the Orders system and building custom pipelines.

For me it was really cool to show Max some of the stuff that I have been working on. Especially on how I have extended the Payment- and Shipping Methods using the standard Profile System and how I integrated this into the Customer and Orders Manager application with pretty much no modification to the application at all. I'm proud to say that Max found the stuff I did very cool. I might write a post about it some day.

Also pretty cool was that Max gave us some of the custom tools that he has developed for his various Commerce Server solutions and I'm absolutely sure that they will come in pretty handy in our solutions as well. Max is a really nice guy and besides all the training he did we also had a lot of fun during the training days. I'm really glad to met Max and hopefully I'll come across him again some day.

I'm sorry for any bad English, bad grammar or misspelling. The clock is getting pretty late and I'm not even done packing all my stuff yet. The thing is that we are all leaving very early in the morning (4.15 AM to be exact) as we are going with the train from Aarhus to the Copenhagen Airport from where we are flying to Edinburgh. Vertica has arranged a company trip throughout the weekend to Scotland which I'm really looking forward to.

Posted on Thursday, 06 September 2007 21:30:35 (Romance Standard Time, UTC+01:00)
# | Comments [0]
 Saturday, 01 September 2007

I was told yesterday by Søren that dasBlog has released a new version of their blog engine with complete migration to ASP.NET 2.0.

Although the previous version I used (1.9.7) also was hosted on ASP.NET version 2.0, it is always nice to upgrade to the newest version and know that it is now a native ASP.NET 2.0 application.

Not much to report on the upgrade part - it all went smooth.

Le me know if you encounter any problems - thanks :)

Posted on Saturday, 01 September 2007 11:39:49 (Romance Standard Time, UTC+01:00)
# | Comments [1]
 Tuesday, 28 August 2007

Today I have been planning my upcoming education strategy for the rest of the year. I'm going for the MCTS: .NET Framework 2.0 Web Applications certification which includes two exams:

  1. Exam 70–536: TS: Microsoft .NET Framework 2.0 - Application Development Foundation
  2. Exam 70–528: TS: Microsoft .NET Framework 2.0 - Web-Based Client Development

The books have already been ordered by my employer and I have set the estimated dates for the exams. My goal is to complete the first exam by week 42 (October) and complete the next exam by week 49 (December).

Announcing it here on my blog and declaring a specific timeframe is an intentional strategy to give myself some degree of pressure that should keep me focused on completing it in time.

This will be my first certification to come so I'm obviously very excited about all this. Last year I completed a x-masterclass Axapta 3.0 System Development course and was supposed to take a certification in Dynamics AX 4.0 Development, but such particular certification was not available at that time. And still isn't - at least what I know of.

It is my plan to achieve the Microsoft Certified Professional Developer (MCPD) Web Developer certification - although this will properly not happen before Q1/2008. After that I think that it would be clever to focus on some SQL Server 2005 aimed certifications.

My ultimate goal would be to become a Microsoft Certified Architect (MCA) one day. It was my colleague Søren who introduced me to this today, but it seems to be a hard thing to accomplish. I believe such a certification will be very valuable.

So - now there is really nothing else to it, than open the books and start reading...

Posted on Tuesday, 28 August 2007 19:50:41 (Romance Standard Time, UTC+01:00)
# | Comments [0]

The other day I wrote a blog post about a search problem in the Commerce Server Starter Site. I had added a new property to the propertiesToReturn element of web.config and that caused all search operations on the web-site to fail with the following exception from the database: 'Invalid column name 'Show_Variants_As_Products'.

In my efforts to solve the problem I stumbled across another issue when I tried to execute the "Refresh Catalog FullText Index" command on one of my catalogs in the Catalog Manager (screenshot provided).

This command executed without errors but when I tried to perform a new search on the web-site the database threw another exception with the following error message:

Full-text table or indexed view has more than one LCID among its full-text indexed columns.

This post helped me to the solution.

The solution

In SQL Server Management Studio I opened the Product Catalog database and found the table holding the products for the specific catalog I initially performed the Refresh command on. I changed  the "Language for Word Breaker" setting for the CategoryName column from 'English' back to 'Neutral'  in the properties Full Text Indexing (screenshot provided below).

dbo.[catalogname]_CatalogProducts > Full Text index > Properties > Columns > CategoryName=Neutral (from English)

Posted on Tuesday, 28 August 2007 19:30:22 (Romance Standard Time, UTC+01:00)
# | Comments [0]
 Saturday, 25 August 2007

Short explanation

When creating a new property definition which has the 'Assign to all products' attribute set to true and when this new property is added to the propertiesToReturn element in web.config (configuration/commerceSite/propertiesToReturn) search operations on the web-site can cause the following exception: Invalid column name '[property-name]'. This occurs if one or more of the catalogs in Commerce Server are out of sync with the catalog schema (defined in the Catalog And Inventory Schema Manager) e.g. if the catalog is empty.

Solution: Create a new dummy product in each catalog to ensure synchronization is done. You can safely delete the dummy product after creation.


Complete explanation

I had added the property 'Show_Variants_As_Products' in the Catalog And Inventory Schema Manager. The 'Assign to all products' attribute was set to true to ensure that all products in Commerce Server include this property.

Afterwards I added the new property to the propertiesToReturn string list in web.config:

<commerceSite
 requireSSL="false"
 enableExpressCheckout="false"
 persistAnonymousBaskets="false"
 rewriteProductUrls="true"
 assetLocation="~/"
 defaultShippingMethodId="87c0e40f-3661-4197-8f88-fa3f101ae1ad"
 propertiesToReturn="CategoryName, ProductID, CatalogName, i_ClassType, DisplayName, cy_list_price, VariantID,  Show_Variants_As_Products">

This setting ensures that the property is available in the returned DataSet when e.g. performing search operations on the web-site.

However when I tried to perform a search, the web-site crashed with the following exception coming from the SQL Server:

Invalid column name 'Show_Variants_As_Products'.

In the Catalog Manager I opened a random product in one of my catalogs to verify that the new property was actual present - and it was. So a bit confused I opened SQL Server Profiler to create a new trace to check the queries which was actually sent to the database from the web-site when performing a search.

The query sent to the database was:

exec dbo.ctlg_GetResults
 @Catalogs=N'MyCatalog1,MyCatalog2,MyCatalog3,',
 @Language=N'da-DK',
 @PropertiesToReturn=N
'[CategoryName], [ProductID], [CatalogName], [i_ClassType], [DisplayName], [cy_list_price], [VariantID], [Show_Variants_As_Products], [BaseCatalogName],
 [oid], [OrigProductId], [OrigVariantId], [OrigCategoryName], [DefinitionName], [PrimaryParentCategory], [UseCategoryPricing]'
,
 @SQLClause=NULL,
 @FTSPhrase=N'perfume',
 @AdvancedFTSPhrase=NULL,
 @OrderBy=NULL,
 @StartingRec=1,
 @NumRecords=10,
 @SortAscending=1,
 @ClassType=10,
 @eJoinType=-1,
 @TargetTableName=N'',
 @SourceJoinKey=N'',
 @TargetJoinKey=N'',
 @RecordCount=@p16 output,
 @EnableInventory=1,
 @InventoryServerName=NULL,
 @InventoryDatabaseName=NULL,
 @FilterOutOfStockProducts=0,
 @FilterBackOrderableProducts=0,
 @FilterPreOrderableProducts=0,
 @UseThresholdAsFloor=1,
 @TreatmissingAsOutOfStock=0,
 @StockHandling=0,
 @InventoryPropertiesToReturn=N'*',
 @CategoryClause=NULL,
 @Recursive=0

When executing this query directly on database I got the same error message. I opened each of the catalog tables to verify that the new column 'Show_Variants_As_Products' was present. The column was present in the first two catalogs (MyCatalog1 and MyCatalog2) but in the last catalog (MyCatalog3) the column was not present indicating that this specific table was out of sync with the Catalog schema. The catalog was also in fact empty. So creating a new dummy product in MyCatalog3 using the Catalog Manager did the trick of getting the MyCatalog3 catalog table back in sync with the Catalog schema. I tested it with a new search operation on the web-site and everything returned successfully.

Posted on Saturday, 25 August 2007 11:24:16 (Romance Standard Time, UTC+01:00)
# | Comments [0]