Saturday, June 23, 2007

As was announced yesterday, Service Pack 1 has been released for Commerce Server 2007.  This service pack includes support for Windows Vista, the ability to create web application projects in Visual Studio 2005, performance and security enhancements, and a slew of bug fixes.

I have detailed the process for installing SP1 and upgrading your CS sites in the following posts: Commerce Server 2007 Service Pack 1 (SP1) Walkthrough and Commerce Server 2007 Upgrade Wizard (post SP1 install) Walkthrough.

While installing SP1 I encountered a rather strange problem.  Let me try to explain how the problem occurred, and what I did to resolve it.

To begin, I decided to upgrade my Commerce Server 2007 virtual machine to SP1.  To begin, I did the following:

  1. Followed the steps I detail in my post Commerce Server 2007 Service Pack 1 (SP1) Walkthrough.  In fact, these screen shots were taken during this initial installation of SP1.
  2. After I installed SP1, I immediately launched the Upgrade Wizard.
  3. For the most part, I followed the steps outlined in my post Commerce Server 2007 Upgrade Wizard (post SP1 install) Walkthrough.  However, instead of upgrading both my StarterSite and CSharpSite, I only upgraded my CSharpSite and then rebooted my machine.

Why did I reboot the machine after only upgrading one site?  Well, I'm not exactly sure.  Part of me wanted to see what would happen with only one site upgraded, and another part wanted to upgrade one site at a time while rebooting in-between.  Regardless, I rebooted after installing only the CSharpSite.

After rebooting, here was my first indication that something was wrong.

At least one service or driver failed during system startup.

So, I immediately went to the Event Viewer.  I saw a number of errors involving the SQLSERVERAGENT, Commerce Server, and ENTSSO.  Here's a look at the various errors in the log (the reboot occurred around 10:52 am ... some of these other errors were thrown from my playing around before I resolved the problem):

Event Viewer errors

I should note that the system was previously very healthy, as I use this VM all the time while writing the book Professional Commerce Server 2007 for WROX.  In fact, I had been using the computer with no problems immediately before installing the service pack.

So, at this point it was clear that:

  1. The SQL Server Agent was no longer able to start-up.

    SQLServerAgent could not be started (reason: Unable to connect to server '(local)'; SQLServerAgent cannot start).
  2. Enterprise Single-Sign On (ENTSSO) was also having issues starting because it couldn't communicate to SQL Server 2005.

    The SSO service failed to start.
    Error Code: 0x800710D9, Unable to read from or write to the database.
  3. Commerce Server was complaining that I hadn't updated the StarterSite yet (this one is to be expected, as I hadn't updated it yet):

    Error in Commerce Administration Object : Description - 'The following resources are old. They will not function correctly until they are upgraded:
    Product Catalog (7.1.0)
    Marketing (7.0.0)

Obviously, something here is wrong, and SQL Server seemed to be at the heart of it.

The next thing I did was try to connect to SQL Server 2005.  Using the SQL Server Management Studio, I tried to login with my Windows credentials.  I wasn't surprised to see that I couldn't:

A connection was successfully established to the server, but then an error occured during the pre-login handshake. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 223)

"A connection was successfully established to the server, but then an error occurred during the pre-login handshake. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 223)" (copied directly from dialog window)

I have never seen this error before, but wasn't surprised to see that I couldn't find anything anything on Google or Live (although, hopefully this post will come up in the future).  Sure, various iterations of the first part can be found, but nothing seems applicable to this situation.

So, I decide to poke around.  What bothered me was that SQL Server (MSSQLSERVER) was running yet I couldn't connect to it, and the SQL Server Agent (MSSQLSERVER) itself couldn't start.  Even my attempts to manually start the service failed.  Here's a look at SQL Server Configuration Manager:

SQL Server Configuration Manager

Also, I attempted to connect to Commerce Server by running the Upgrade Wizard ... it didn't start, nor did I receive an error.  It simply didn't start.

For some reason, one thing jumped out at me -- I was running as LocalSystem rather than NT AUTHORITY\NetworkService.  Could this have something to do with it?

Not having any other ideas, I changed both SQL Server and SQL Server Agent to "Log on as" the "Network Service" (NT AUTHORITY\NetworkService) instead of the LocalSystem account.  I then restarted SQL Server 2005 and the SQL Server Agent.  Lo and behold, the SQL Server Agent started-up!

Config2

A little baffled, but encouraged that I was on track to resolving the problem (even if I don't understand the root cause), I tried to connect to SQL Server 2005.  Sure enough, I was able to login to the database server and interact with the various databases.  I also attempted  to connect to the Commerce Server 2007 Upgrade Wizard, which immediately started with no problems.

Since I wasn't too confident with the state of the computer (given that some services still weren't started), I decided to restart the computer.  It restarted without a single error, and I was able to run the Upgrade Wizard successfully to upgrade the StarterSite.

At this point I don't quite know why there was a problem with the LocalSystem account after I installed SP1 for Commerce Server 2007.  I intend to do a little more research to look into it.

Have any of you encountered this problem?  Can you shed some light on the situation?

Thanks, and I hope this helps!

Posted on 06/23/2007 # Comments [0] Trackback

In my previous post, I detailed the process for installing the Commerce Server 2007 SP1.  In this post, I have created a walkthrough for the Commerce Server 2007 Upgrade Wizard.  The upgrade wizard should be run for all of your Commerce Server 2007 sites immediately after you have installed SP1.  So, before you begin this process, be sure you have successfully installed SP1.

(Note: I created this walkthrough, along with verbose screen shots and text, largely for documentation I am delivering to clients.  Please feel free to use these screen shots and/or text for your own documentation.)

A couple comments based on my experience installing SP1 and upgrading through the wizard:

  • Immediately upgrade all of your Commerce Server 2007 sites.  Do not reboot your machine before you run the Upgrade Wizard.
  • Make sure SQL Server 2005 is running with the appropriate built-in account.  For example, when I initially installed SP1 my SQL Server 2005 instance ran as "Local System".  However, post install, I had to switch the built-in account to "Network Service" for SQL Server 2005 to start-up properly.  I will write a separate post about some issues I had the first time installing SP1.

That said, here's the process for using the Upgrade Wizard to upgrade your Commerce Server 2007 sites.

  1. Launch the Upgrade Wizard.  You can launch this application automatically after installing SP1 or by running the Upgrade Wizard (Start -> All Programs -> Microsoft Commerce Server 2007 -> Tools -> Upgrade Wizard).  Click Next to begin.

    CS 2007 Upgrade Wizard: Welcome
  2. On the Select Options screen, specify the log file path.  I left the default location.  Click Next to continue.

    CS 2007 Upgrade Wizard: Select Options
  3. On the Select a Commerce Site screen, specify the site you want to upgrade.  Note: if you have more than one site, you can only upgrade on at a time; you can re-run the Upgrade Wizard to upgrade additional sites.  Click Next to continue.

    CS 2007 Upgrade Wizard: Select a Commerce Site
  4. On the Upgrade Site Resources screen, you have the option to choose Migrate or Do Nothing for your various resources.  Select the action Migrate for all your resources.  Click Next to continue.

    CS 2007 Upgrade Wizard: Upgrade Site Resources
  5. The Upgrade Summary screen reviews the selections you have made.  Review the selections, and click Next to start the upgrade.

    CS 2007 Upgrade Wizard: Upgrade Summary

    CS 2007 Upgrade Wizard: Upgrade Process
  6. Once the upgrade is complete you will have to click the Next button to continue.

    CS 2007 Upgrade Wizard: Upgrade Process (summary)
  7. On the Summary screen, you can review the upgrade and click Main error log to review any errors.  Click Next to continue.

    CS 2007 Upgrade Wizard: Summary
  8. You have successfully upgraded  your Commerce Server 2007 site.  Click Finish to complete the upgrade wizard.

    CS 2007 Upgrade Wizard: Complete
  9. After you click Finish you are reminded to restart.  Click OK to continue.

    CS 2007 Upgrade Wizard: Restart notice
  10. If you have additional Commerce Server 2007 sites to upgrade, repeat steps 1-8.
  11. Once you have upgraded all your Commerce Server 2007 sites, restart your computer.

The process is reasonably straightforward, and I encountered no problems.

Please be sure to share your experiences.

I hope this helps!

Posted on 06/23/2007 # Comments [0] Trackback

I went through the process of upgrading my Commerce Server 2007 sites today.  While I had a few issues with the installation, I was able to get everything updated and functioning.

There are really two parts to the SP1 installation: the first is the installation of SP1 itself, and the second is the upgrade wizard that must run against your Commerce Server 2007 sites.  This post will walk you through the installation of the service pack itself.  The upgrade wizard walkthrough is discussed in a separate post.

Before you install Service Pack 1 for Commerce Server 2007, I recommend you do the following:

  1. Test SP1 by installing first in your development environment.  Ensure that your application continues to function.  If necessary, run regression tests against your application to make sure nothing has been broken.
  2. Install SP1 in your QA or UAT environments, followed by your Stating environment (if you have one).  Again, this is to ensure that your systems are not broken by the installation of the service pack.
  3. Make sure to thoroughly back-up your production environments before you upgrade.  This is VERY important, as you must ensure that you have an exit strategy, should something go wrong.  Do not neglect this step, or you may regret it.

Okay, that said, you must first download SP1 before you can begin.  You can download SP1 for Commerce Server 2007 here: http://www.microsoft.com/downloads/details.aspx?FamilyId=748049C5-A9BF-4AEC-91A0-AFE2DE0BF860&displaylang=en

(Note: I created this walkthrough, along with verbose screen shots and text, largely for documentation I am delivering to clients.  Please feel free to use these screen shots and/or text for your own documentation.)

Once you have downloaded the file, you can begin the following steps:

  1. Double-click "CS2007-SP1-ENU.exe".  You will receive a security warning - click Run to continue.

    WalkThru1
  2. Specify a location to unzip the necessary files, and click Unzip.

    WalkThru2
  3. Browse to the location you unzipped the files and review the ReadMe.htm file.
  4. After you have read the ReadMe.htm file, double-click SP1Setup.exe to launch the installation wizard.
  5. On the CS 2007 SP1 Installation Wizard starter screen, click Next to continue.

    WalkThru3
  6. Read the license agreement, specify that you accept the terms, and click Next to continue.

    WalkThru4
  7. Click Next to begin the installation.

    WalkThru5
  8. A dialog box will indicate that various services will be stopped.  Click OK to acknowledge and continue.  The installation of SP1 will (finally!) begin.

    WalkThru6

    WalkThru7
  9. Once the installation is complete, a summary page displays.  You can take a look at the log file (which I would recommend) and can also immediately launch the Commerce Server Upgrade Wizard (which I would also recommend).  Click Finish to complete the Commerce Server 2007 SP1 upgrade.

    WalkThru8

At this point you must upgrade any Commerce Server 2007 sites you have installed on the machine.  I will discuss this process in a separate post.  I have two recommendations for you at this point:

  • Immediately upgrade all of your Commerce Server 2007 sites.  If you don't upgrade them, you will get errors like the following (notice that I learned this out of experience):

     Error
  • Wait to reboot your server until you have upgraded all of your Commerce Server 2007 sites.  See my post for more details.

I hope this helps!  Best of luck!

Posted on 06/23/2007 # Comments [0] Trackback
 Friday, June 22, 2007

The Commerce Server team has just announced the release of SP1 for Commerce Server 2007.

Here's the new features/enhancements they highlight:

  • Support for Commerce Server 2007 Developer Edition and business user applications on Windows Vista
  • Ability to create a Commerce Server 2007 Web Application Project in Visual Studio 2005 -- something that  it definitely needed!
  • Performance enhancements
  • Security enhancements
  • Various fixes (here's a list of all the bugs fixed with SP1)

Note the fine print from the site: "Commerce Server 2007 SP1 includes updated binaries in English only. Each business user application that Commerce Server 2007 provides is available in English only. This does not affect your ability to develop a multilingual Commerce Server Web site.  Installing SP1 on non-English versions of Commerce Server 2007 is not supported."

You can download SP1 here: http://www.microsoft.com/downloads/details.aspx?FamilyId=748049C5-A9BF-4AEC-91A0-AFE2DE0BF860&displaylang=en

Also, you can download the updated partner SDK here: http://www.microsoft.com/downloads/details.aspx?FamilyId=BDEA4873-2C06-4C7F-AD51-830A0309FECC&displaylang=en

I plan to update my virtual images with SP1, so I'll be sure and blog about the experience later tonight!

[Update]

Posted on 06/22/2007 # Comments [0] Trackback
 Tuesday, June 19, 2007

As a Commerce Server developer, you are bound to come across a situation where the smart client business user applications (e.g. the Catalog Manager, Catalog and Inventory Schema Manager, Customer and Orders Manager, and Marketing Manager) do not satisfy a business requirement, need to reflect a company's brand or style, or your business users simply want it changed.

Fortunately, you can get the full C# source code for the business user applications (except for the Catalog and Inventory Schema Manager; see Max's comment in this thread) through the Commerce Server 2007 Partner SDK.  This gives you the ability to modify the business user applications and be a hero to all your colleagues and clients (chuckle!).

Yeah, yeah, this is all old news.  However, I just came across a great idea from Søren Spelling Lund in which he talks about his experiences using ClickOnce Deployment along with the business user applications.

What is ClickOnce Deployment?

ClickOnce deployment is a technology designed to ease the difficulty in creating self-updating Windows-based applications.  Using the Publish Wizard in Visual Studio 2005 (or mage.exe, mageui.exe, or MSBuild), you can publish your application in three different ways: to media (such as a CD-ROM), to a network file share, or to a Web page.

When an application is published, two files are created: an application manifest, and a deployment manifest.  The application manifest describes the contents of  the application, including the assemblies, dependencies, and the files that make up the application.  The deployment manifest describes how the application is deployed, the location of the application manifest, and the version of the application that should be run by the clients.

Here's an example of an application published to a Web page (this particular example is from the SpaceWar SDK for the XNA framework - yes, I truly aspire to be an XBOX 360 game developer):

Example of application published to a Web page via ClickOnce

(Note the deployment version number.)

Once the end-user installs the application from the deployment location, the application is, by default, added to the Start menu and the Add/Remove programs group in the Control Panel.  Nothing is added to the Program Files folder, the registry, or the desktop.  When I first played around with ClickOnce this last part caught me unaware -- I couldn't figure out where my application had been installed!  Also, no administrative rights are required to install the application.

Now, remember the deployment version number?  The best part about this technology is that, if a developer publishes a new version of the application, the deployment version number is incremented.  Consequently, the next time the end-user runs the application they are presented with an opportunity to update their application.  What's neat is that, as a developer, you actually have a lot of control: you can require an update, and you can even require that a user rolls back to an earlier version of the application (not that any of us would ever have to roll back to an earlier version ...).

All-in-all, it's neat stuff.  And, while it's not a perfect solution and has it's own problems, you can very rapidly integrate it into your application and quickly reap the rewards.  Oh, and you can easily become a hero to your colleagues and clients (are you starting to sense a pattern?).

Integrate ClickOnce Deployment into the Partner SDK?

So, we're back to the smart client business user applications.  I'm sure you're now asking yourself, what does this have to do with the Commerce Server 2007 business user applications (or maybe not, since I alluded to it above)?

Søren Spelling Lund posted an article about integrating ClickOnce Deployment into the business user applications.  It's a great idea, and one I will definitely use in the future.  Additionally, he takes the time to point out a problem him and his colleagues ran into when they tried to run the ClickOnce installer on the Customer and Orders Manager.  Essentially, it appears that the project file included a <TargetZone> element that interfered with the ClickOnce installer.  Removing the <TargetZone> element resolved the problem.  Check out his blog article for the full details.

What are the benefits of integrating ClickOnce Deployment into the Partner SDK?

  • Ease - Easily deployment of business user applications to end-users
  • Versioning - Make sure your end-users are running the latest and greatest
  • Safety - The ability to roll back to a previous version of the application (just in case!)
  • Security - The applications run in a security context that prevents users from doing malicious things
  • Fame - Yes, you too can be a hero ...

Thanks to Søren for a great idea and a great post!

What great ideas have you put into play?  Please let me know!

Posted on 06/20/2007 # Comments [0] Trackback

During the installation of the Commerce Server 2007 Starter Site, I received the following error in the Pup.log file:

[10:57:50] Error importing object data for Transaction Config from file C:\Documents and Settings\Administrator\Local Settings\Temp\Transaction Config 8004E024:COM+ activation failed because the activation could not be completed in the specified amount of time. (Exception from HRESULT: 0x8004E024)

I also saw the following error in the Application Log, written at the exact same time:

Failed to import orders configuration data. System.Runtime.InteropServices.COMException (0x8004E024): COM+ activation failed because the activation could not be completed in the specified amount of time. (Exception from HRESULT: 0x8004E024)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri)
   at System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type serverType)
   at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
   at Microsoft.CommerceServer.Orders.DataManagement.ServerOrderSystem.ImportRegionCodes(String txnConfigResourceConnectionString, DataTable regionCodesTable)
   at Microsoft.CommerceServer.Orders.DataManagement.ServerOrderSystem.ImportConfigurationData(Stream stream, String txnConfigResourceConnectionString)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

I should note that, rather than install the Starter Site to a virtual directory under the Default Web Site, I decided to create a new Web site to which I installed the Starter Site.  The reason I did this is I already had the CSharpSite installed to the Default Web site, and I didn't want the two sites interfering with each other.

Also, to provide other information regarding this installation (just to show I'm not making an obvious mistake):

  • I ran it as the local Administrator account; full access to the system and SQL Server
  • Windows Server 2003 Standard R2; SQL Server 2005 Standard SP2; Commerce Server 2007 Developer edition
  • All hot fixes have been applied to the O/S
  • Instructions provided by the Commerce Server 2007 Start Site Installation Guide were followed
  • The CSharpSite was previously installed successfully
  • Everything is running locally (CS 2007, SQL Server 2005, BizTalk 2006), so it's not as if DTC (or some nefarious networking issue) is causing problems

This was the only error I received during the installation.  I took note of it, then continued onward.

Lo and behold, when I went to test the installation of the Starter Site, I received the following error:

The specified value for the newOrderStatus attribute is not valid.  The value provided was: 'NewOrder'. Please make sure an entry for this value exists in the AllowedStatus table in the transaction config database.

So, I decided to investigate.  Sure enough, the tables in the StarterSite_transactionconfig database were empty.  Specifically, the AllowedStatus, RegionCodes, and StatusManager tables did not contain any data.  So, I created scripts based on the data contained in these tables in the CSharpSite_transactionconfig database (which installed without any problems).

[Update] Note: see below for the actual resolution to this problem.  Although the following steps will correctly resolve the problem, there's a better way.

For example, here's the script generated for the AllowedStatus table (it's a bit more extensive for the RegionCodes table -- e-mail me if you need a copy of the script):

INSERT INTO [StarterSite_transactionconfig].[dbo].[AllowedStatus] ([Status]) VALUES ('Cancelled')
INSERT INTO [StarterSite_transactionconfig].[dbo].[AllowedStatus] ([Status]) VALUES ('InProcess')
INSERT INTO [StarterSite_transactionconfig].[dbo].[AllowedStatus] ([Status]) VALUES ('NewOrder')
INSERT INTO [StarterSite_transactionconfig].[dbo].[AllowedStatus] ([Status]) VALUES ('Rejected')
INSERT INTO [StarterSite_transactionconfig].[dbo].[AllowedStatus] ([Status]) VALUES ('Shipped')
INSERT INTO [StarterSite_transactionconfig].[dbo].[AllowedStatus] ([Status]) VALUES ('Submitted')

After inserting the missing data into these three tables, and running iisreset from the command-line, the Starter Site ran without any problems.

I still plan to try and investigate the underlying cause of the problem ... when I learn more, I'll update this post.  At the very least, I wanted to post this solution.

I hope this helps!

[Update] The actual solution to this problem.

Shortly after going through the previous steps, I performed the this Google search and noticed the following in the Commerce Server 2007 Readme file:

Unpacking a site might not populate the AllowedStatus table
The following error message might occur in the site packager log file:

"8004E024:COM+ activation failed because the activation could not be completed in the specified amount of time. (Exception from HRESULT: 0x8004E024)"

This error message indicates that Commerce Server could not populate the AllowedStatus table in the transactionconfig database. To populate the AllowedStatus table, open SQL Server Management Studio (open SQL Query Analyzer if you are using SQL Server 2000), and run the regiondata SQL script against the transactionconfig database. The regiondata script is located at %COMMERCE_SERVER_ROOT%\SDK\Samples\SiteCreate\.

So, it appears to be a known issue (previously unknown to me, though!) and easy to resolve!

What's the moral of this story?  Make sure to thoroughly research errors before you try to hack the solution yourself (or blog about it), even if you accidentally get the resolution correct.

I hope this saves someone the 30 minutes it cost me!

Posted on 06/19/2007 # Comments [1] Trackback
 Monday, June 18, 2007

I'm finally taking the time to highlight two blogging widgets that I have been using on my blog: ClustrMap and whos.amung.us.  These aren't the only widgets I use, but of the half-dozen scattered throughout my blog these are (arguably) the least well-known (at least, I don't see them very often).

The first is ClustrMap.  ClustrMap is a mapping widget that embeds itself into your blog and visually displays the location of your various visitors.  ClustrMap provides HTML source that renders as a map, and when it loads it increments a counter and displays the locations of all the visitors to your page.  Clicking on the map zooms to a big world map, and allows you to zoom into the continents.

I use this in my sidebar, toward the bottom of my blog.  Here's what it looks like:

ClustrMap example

It reminds me of a small-scale version of the map Google Analytics provides.  Here's an example of the script you would embed within your HTML:

<a href="http://www2.clustrmaps.com/counter/maps.php?url=http://blog.wadewegner.com"
temp_href=http://www2.clustrmaps.com/counter/maps.php?url=http://blog.wadewegner.com
id="clustrMapsLink">
  <img src=http://www2.clustrmaps.com/counter/index2.php?url=http://blog.wadewegner.com
style="border:0px;"
alt="Locations of visitors to this page"
title="Locations of visitors to this page"
id="clustrMapsImg"
onError="this.onError=null;
this.src='http://clustrmaps.com/images/clustrmaps-back-soon.jpg';
document.getElementById('clustrMapsLink').href='http://clustrmaps.com'" />
</a>

Very easy to use and setup.  It takes about a day for it to gather enough information and draw a map, so don't expect it to work immediately.  If you click on the map you can get a few statistic about the site.  Here's an example:

ClustrMap stats

The second widget is whos.amung.us.  Have you ever wanted to know how many users are reading your Web site or blog in real time?  This widget is the answer.  Again, they provide HTML script that you can embed within your Web site, and it renders as an image that counts the number of users on your Web site.  Clicking on the images takes you to their Web page, which shows you exactly which pages your readers are on, as well as how long ago they arrived.

Here's what the widget looks like:

counter

Here's the page that shows the URLs your readers are currently at (it's also neat that the links refresh themselves every few seconds):

whos.amung.us stats

Also, whos.amung.us provides a functional Color Wheel that allows you to change the colors of the widget:

whos.amung.us color map

As with ClustrMap, the code for this widget is very simple:

<a href=http://whos.amung.us/show/ds0261t1>
  <img src=http://whos.amung.us/cwidget/ds0261t1/7cbafcffffff 
temp_src=http://whos.amung.us/cwidget/ds0261t1/7cbafcffffff
alt="counter" width="81" height="29" border="0" />
</a>

Neither of these tools, ClustrMap or whos.amung.us, require you to setup an account or provide any personal information.  Simply paste the HTML code into your Web page, and off you go!

What tools and/or widgets do you use on your blog or Web site that are useful?

Posted on 06/19/2007 # Comments [0] Trackback

Max Akbar, Commerce Server expert and former Senior Product Manager for the Commerce Server team, has announced his new training company and web site.  Training resources include video tutorials, DVDs, PowerPoint presentations, codes samples, and on-site training.  You can find more information on his Web site at http://www.commerceservertraining.com/.

Max recently left Microsoft to consult and train companies using Commerce  Server.  While this is a huge loss for Microsoft, it is a huge win for the Commerce Server community as there has been a noticeable lack of training resources available.  Max is sure to do an excellent job filling this void.  Additionally, Max is acting as the technical editor on my forthcoming book Professional Commerce Server 2007.

Best of luck, Max!

Posted on 06/18/2007 # Comments [0] Trackback
 Thursday, June 14, 2007

... and here's a good reason why:

Every time I attempt to search, I get the error "Sorry, Unable to process request at this time -- error 999."  This has been occurring for at least the past 30 minutes.  However, I pinged a friend of mine, Brad Younge, and he can search just fine.  Quite strange!

A quick search via Google (and no, I've never received an "unable to process request at this time" error from Google) shows that a LOT of people have this problem.

So, I can safely say that no, I don't Yahoo!.

Anyone know why this happens?

[Update]

I found an excellent description of this error on Murray's Binary Bit Bucket.  It appears that the most common reason for this error is some sort of bandwidth limiting that Yahoo! put in place on their servers.  The idea is to prevent both DoS (Denial of Service) attacks and automated processes that would pummel their servers with requests.

Wonder why it targeted me?

[Update 2]

About an hour after posting I can now search again.  We'll see if I can purposely cause this to occur again!!

[Update 3]

Yep, I was able to purposely cause Yahoo! to prevent my from issuing searches.  I wrote a little application that does the following:

string url = "http://search.yahoo.com/search?p=wade+wegner&fr=yfp-t-501&toggle=1&cop=mss&ei=UTF-8";
for (int i = 0; i < 1000; i++)
{
   HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
   request.Method = "GET";
   request.AllowAutoRedirect = false;
   request.Proxy = WebProxy.GetDefaultProxy();
   request.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
   WebResponse response = request.GetResponse();
}

So, evidently Yahoo! doesn't appreciate it if you make 1000 calls in a short period of time.  Interesting!

Posted on 06/14/2007 # Comments [0] Trackback

One of the more manually intense steps in the installation of Commerce Server is setting up the appropriate SQL logins and Database Role User Mapping.  This task can easily take 30 - 60 minutes to complete if done manually.  Futhermore, it's likely that this is the easiest step to make a mistake, which will cause problems for you down the road.

So, to make this process quicker and less prone to errors, I've created an SQL script that you can run against your database.  This script performs two tasks:

  1. Creates the SQL login accounts (e.g. COMPUTERNAME\CatalogWebSvc).
  2. Associates the SQL login accounts to database roles.

Note: this script is only for SQL Server 2005.  SQL Server 2000 uses a different set of database roles.

Take a look the Grant Web Applications and Window Services Access to the Databases section of the Installation Guide for Commerce Server 2007, and you'll see that the number of role assignments is quite extensive.

Rather than pasting the entire SQL script into this post, I am only going to upload the .SQL file.  You can modify this file as necessary in order to adapt it to your environment (e.g. changing the computer name, you may have different names for logins, or don't need services like the direct mailer).

CreateCSLoginsAndAssignRoles.sql.txt (12.54 KB) (just remove the .txt extension)

I hope this helps!

[Update]

I found it useful to create an abbreviated verion of this script that is used for adding new sites.  Whereas the script "CreateCSLoginsAndAssignRoles.sql.txt" is for brand new installations of Commerce Server 2007, the following script is useful for when you add a new site and re-use users and logins.

CreateCSLoginsAndAssignRolesForNewSites.sql.txt (8.42 KB) (just remove the .txt extension)

Posted on 06/14/2007 # Comments [0] Trackback

Holy moly, I've gone script crazy!

Here's another little script that helps with the installation of Commerce Server 2007 (perhaps when I'm all done, I'll consolidate them all into an uber-script).  This script creates the Business Management Administrator Windows groups, which are used to control authorization roles within the Authorization Manager.

This script creates four Windows groups (CatalogAdminGroup, MarketingAdminGroup, ProfilesAdminGroup, and OrdersAdminGroup) and then assigns users to those groups.

Without further ado, here's the script:

' ===================================================================
' Author:      Wade Wegner
' Create date: 06/14/2007
' Description: Automate the creation and assigning of Windows Groups
' File Name:   CreateAndAssignCSGroups.vbs
' ===================================================================

' Set the local computer name. Unlike other examples, use the computer name,
' rather than "."; the AssignUserToGroup method requires the actual name
strComputer = "CS2007"

strCatalogAdminGroup = "CatalogAdminGroup"
strMarketingAdminGroup = "MarketingAdminGroup"
strProfilesAdminGroup = "ProfilesAdminGroup"
strOrdersAdminGroup = "OrdersAdminGroup"
strIISWorkerProcessGroup = "IIS_WPG"

' Run the Load method
Load

' Encapsulates the processing of this script
Sub Load()

   ' Create the windows groups
   CreateWindowsGroup strCatalogAdminGroup, "Catalog administration group"
   CreateWindowsGroup strMarketingAdminGroup, "Marketing administration group"
   CreateWindowsGroup strProfilesAdminGroup, "Profiles administration group"
   CreateWindowsGroup strOrdersAdminGroup, "Orders administration group"

   ' Add any users you desire
   AssignUserToGroup "Administrator", strCatalogAdminGroup
   AssignUserToGroup "Administrator", strMarketingAdminGroup
   AssignUserToGroup "Administrator", strProfilesAdminGroup
   AssignUserToGroup "Administrator", strOrdersAdminGroup

   ' This adds the various service accounts to the IIS_WPG group, so that the
   ' services can run as the identity for IIS app pools
   AssignUserToGroup "RunTimeUser", strIISWorkerProcessGroup
   AssignUserToGroup "CatalogWebSvc", strIISWorkerProcessGroup
   AssignUserToGroup "MarketingWebSvc", strIISWorkerProcessGroup
   AssignUserToGroup "OrdersWebSvc", strIISWorkerProcessGroup
   AssignUserToGroup "ProfilesWebSvc", strIISWorkerProcessGroup

   Msgbox "Complete!"

End Sub

' Create the Windows group
Sub CreateWindowsGroup(groupName, description)

   Set objComputer = GetObject("WinNT://" & strComputer & "")
   Set objGroup = objComputer.Create("group", groupName)

   objGroup.Description = description
   objGroup.SetInfo

End Sub

' Assign the user to the Windows group
Sub AssignUserToGroup(userName, groupName)

   Set objGroup = GetObject("WinNT://" & strComputer & "/" & groupName & ",group")
   Set objUser = GetObject("WinNT://" & strComputer & "/" & userName & ",user")

   objGroup.Add(objUser.ADsPath)

End Sub

Pretty straightforward.  Nothing too fancy or flashy.

CreateAndAssignCSGroups.vbs (1.98 KB)

I hope someone fiinds this helpful!

Posted on 06/14/2007 # Comments [2] Trackback
 Wednesday, June 13, 2007