Mar022010

The cryptic CSApp.ini

Published by david at 5:39 PM under Commerce Server

Before ASP.Net membership providers, Commerce Server used ISAPI based authentication in conjunction with CommerceAuthentication HTTP module for authentication. This, of course, was rendered obsolete with the introduction of Membership providers and subsequently the UPMProvider. But, nonetheless, this little cryptic file (CSApp.ini) was left each and every time you un=package a Commerce Solution. If you dare delete it, you get a nasty error at your application start-up.

So, what’s the deal? Well, it stands in the fact, that the standard web.config file for Commerce Server 2009 still includes the HTTP Module. So, in order to get rid of the CSApp.ini file, you need to remove the CommerceAuthenticationModule from the HttpModules section in your web.config.

And there you go. Your application is not bound to your CSApp.ini file!



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

Jan272010

You cannot target advertisements or discounts to specified page groups by using the Discount Ad Web Part in Commerce Server 2009

Published by david at 4:32 PM under Commerce Server | SharePoint 2007

While working on a Commerce Server 2009 solution, we were trying to create targeted advertisement only on the home page. We noticed that the Page group did not change anything. As it turns out, Microsoft has a fix for that. Here is the link:

http://support.microsoft.com/kb/968758



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Trackback | Post RSSRSS comment feed 1 Responses

Jun262009

Modifying the Commerce Server 2009 Contemporary site’s site definition (Part 1)

Published by david at 10:54 AM under SharePoint 2007 | Commerce Server

While building a new site with Commerce Server 2009 SharePoint services, we wanted to redesign the site and modify a lot of pages. The problem is that for us to do that 3 solutions were possible per Microsoft’s documentation:

  1. Use the extensibility kit to edit the pages and master pages
  2. Change the necessary pages directly in the Layouts folder of that SharePoint hive
  3. Modify the pages in SharePoint designer

None of these solutions were suitable for our need and here are the reasons:

  1. I do not recommend using the extensibility kit because we need to re-sign all the assemblies with a new key and change all references to the public key token. Also, if you modify the extensibility kit, you are making it very difficult to upgrade to future versions of CS 09, unless you only add web parts or pages. Finally, the extensibility kit does not include the contemporary site, which is the one we want to keep as a basis.
  2. Changing the pages in the layouts folder is not a good idea because you basically change it for all of your sites. Of course it’s not an issue because usually there is only one CS site per machine. but still it can be an issue in a dev machine or if ever CS 09 should be used as Saas (Software as a service). Finally, this solution is not re-deployable.
  3. Modifying the pages in SharePoint is also a plausible solution but again it is not deployable and it breaks the site definition.

So, what is the solution? It is to repackage the Contemporary site SharePoint solution and adding your custom features and modified pages. The following modifications were done in MOSS and not in WSS. I’m sure it is possible in WSS though. Also, for the packaging in wsp, I’m using WspBuilder.

So, here we go:

1. Un-pack the MicrosoftCommerceMOSSDefaultSiteV2.WSP file to any folder, let’s say “C:\ContemporarySite”. Your contents should look like this:

image 

2. Now you need to restructure the features and files for WspBuilder. So essentially you would have:

Copy the following folders in 12\Templates\Features:

CommerceServerContemporarySiteCheckOutStepsInstance CommerceServerContemporarySiteImages CommerceServerContemporarySiteProvisioner CommerceServerContemporarySiteResourceDeployment CommerceServerContemporarySiteResources CommerceServerContemporarySiteSPListSampleData CommerceServerContemporarySiteXslts CommerceServerMyAccountSiteMapProvider

Copy the following folders in 12\Templates:

1033
CONTROLTEMPLATES
IMAGES
LAYOUTS
SiteTemplates

Copy the following folder in 12:
Resources
Copy the following files in the GAC folder:

Microsoft.Commerce.Portal.ContemporarySite.dll
Microsoft.Commerce.Portal.ContemporarySiteCommon.dll

 

Now that the basic structure is done, you are able to re-create the Contemporary site’s WSP solution and deploy it using Commerce Server SharePoint Services configurations tool. Before that though you will need to modify the SharePointCommerceServicesConfiguration.exe.config to take the new WSP file:

<sharePointSolutionGroup name="DefaultSiteAndWebPartsMoss" sharePointPlatform="moss" defaultInSilentMode="True">
            <sharePointSolutions>
                <sharePointSolution id="7b93b2ca-e1e4-4783-a038-14094933c002" file="MicrosoftCommerceWebParts.wsp" version="1.0.0.0" wspKey="1"/>
                <sharePointSolution id="Your solution ID Here" file="Your Solution Name Here.wsp" version="1.0.0.0" wspKey="2"/>
            </sharePointSolutions>
            <defaultWebApplicationSettings name="SharePoint - 8088" port="8088" extendedName="SharePoint - 8089" extendedPort="8089" appPoolId="SharePoint - Pool 8088" appPoolUser="domain\someone"/>
            <defaultSiteCollectionSettings create="True" title="Home" name="ContemporarySite" admin="domain\someone" template="MOSSCSContemporarySite"/>
            <defaultCommerceServerSiteSettings create="True" name="ContemporarySite" description="Commerce Server Site for Commerce SharePoint Contemporary Web Site" siteWithSampleData="False" databaseServer="."/>
</sharePointSolutionGroup>

 

Now you can use the configuration tool to deploy your site. Please be advised though that your MOSS environement needs to be clean because you are essentially redeploying the same feature as the contemporary site. Also, do not modify the name of the Contemporary Site’s site definition configuration names such as “MOSSCSContemporarySite” because the receivers look for those configurations.

In the next part of my post, I’ll show you how to modify the master pages and add new features to your site.



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: ,

E-mail | Permalink | Trackback | Post RSSRSS comment feed 3 Responses

Apr052009

Enable database connection sharing for Commerce Server 2007 Profiles

Published by Louis.Philippe at 4:49 PM under Commerce Server

To enable
UnsafeAuthenticatedConnectionSharing.

To do that, create and set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Commerce Server
2007\Profiles\UnsafeAuthenticatedConnectionSharing = 1 (type DWORD). (x86 server)

 

For 64-bit server, it is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Commerce Server
2007\Profiles\UnsafeAuthenticatedConnectionSharing.

For explanation of this, please check MSDN doc at: http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.unsafeauthenticatedconnectionsharing.aspx

[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: ,

E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

Mar252009

Using the store locator in Commerce Server 2009 (Updated)

Published by david at 2:31 PM under Commerce Server

Here is a great video walkthrough on how to use the store locator webpart in Commerce Server 2009. I followed to the letter what Tom is doing and it worked flawlessly. Thanks Tom for the tip. Commerce Server 2009’s webparts are really working well for us.

Get Microsoft Silverlight

Original Post:

http://blogs.msdn.com/tschultz/archive/2009/03/15/commerce-server-2009-web-cast-using-store-locator-web-part.aspx

UPDATE: I updated the video to the Channel 9 version because it is of much higher resolution



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: ,

E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

Mar052009

Important bug in Commerce Server 2009 RTM

Published by david at 12:23 PM under Commerce Server

Here at Orckestra, Commerce Server is an important part of our offering. Evidently, any new release of Commerce Server is analysed and validated against any of our solutions. In this process, We have discovered a very important bug in the new Commerce Server 2009.

Most of our solutions depend on the Free-Text search capabilities of Commerce Server. In this optic, I tried creating a simple search using the API:

var query = new CommerceQuery<CatalogEntity, CommerceCatalogFullTextSearchBuilder>(); 
query.SearchCriteria.Catalogs.Add("My_Catalog"); 
query.SearchCriteria.FirstItemIndex = 0; 
query.SearchCriteria.FullTextSearchType = CommerceFullTextSearchType.FreeText; 
query.SearchCriteria.NumberOfItemsToReturn = 500; 
query.SearchCriteria.Phrase =”My Criteria”; 

query.SearchCriteria.ReturnTotalItemCount = true; 
query.SearchCriteria.WhereClause = "[Active] = 1"; 

As it turns out I was constantly getting an unknown error. Digging through the code and using the SQL Profiler I discovered this line in the [dbo].[ctlg_GetFTSQuery] stored procedure of the catalogue database:

IF @IsVirtualCatalog = 1 or @SQLClause < 1 or (CHARINDEX(N'CONTAINS',@SQLClause) = 0 ) 

where @SQLClause is defined as an nvarchar(MAX). Well, @SQLClause < 1  is wrong and should then read: LEN(@SQLClause) < 1

So in that regard here is the entire line:

IF @IsVirtualCatalog = 1 or LEN(@SQLClause) < 1 or (CHARINDEX(N'CONTAINS',@SQLClause) = 0 ) 

Please remember that this bug is in the RTM so I would advise you to fix immediately or any Free-Text search will fail if it contains a where clause. Here is Microsoft’s official response by the way on the Connect site:

Hello David,
Thanks for reporting this. We have identified it is indeed a product defect.
As you already mentioned here, there is a syntax error inside ctlg_GetFTSQuery. Your suggested fix is correct and probably you have already done such modification from your side.
Unfortunately, the same error is also inside RTM release. We are building official fix for this problem. Please contact Microsoft CTS (Commercial Technical Support) for the official fix.
Thanks
Hao



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: , ,

E-mail | Permalink | Trackback | Post RSSRSS comment feed 1 Responses

Mar052009

Microsoft Commerce Server 2009 goes RTM

Published by david at 12:06 PM under Commerce Server

Microsoft, yesterday, officially announced that Microsoft Commerce Server 2009 has been released to manufacturing with broad availability in April 2009. The bits are available now on MSDN. I suggest to anyone dealing With Commerce Server to take a look at this release. Here is the official announcement:

via the Microsoft e-commerce blog:

Microsoft® Commerce Server 2009 is Now Available on MSDN!

Published 03 March 09 10:28 PM | Lynnette McL

Commerce Server 2009 is now available for download to MSDN subscribers.
Commerce Server 2009 delivers the ability to increase your business reach by making it possible to sell via multiple channels by using an out-of-the-box shopping site, SharePoint® Commerce Services, and the Multi-Channel Commerce Foundation. The new out-of-the-box shopping site leverages SharePoint Commerce Services, which provides a gallery of ASP.NET 3.5 Web parts and controls, a comprehensive e-commerce shopping feature-set, and technology integration between Commerce Server and SharePoint technologies. The Multi-Channel Commerce Foundation provides a new unified, extensible run-time programming model for Commerce Server, including new run-time e-commerce capabilities. 
Download the following Commerce Server 2009 online materials today!
Readme and Installation Guide
Default SharePoint Site Performance Guide
Multi-Channel Foundation Samples
Partner Software Development Kit (SDK)

Commerce Server 2009 will be available to order from the Microsoft Price List effective April 1, 2009 through the normal Microsoft channels and Microsoft Volume Licensing Programs.

Note: Microsoft Commerce Server 2007 Enterprise Edition is also available for download to MSDN subscribers.



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: ,

E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses