How to speed up site rebuild after compiling a DLL

Came across this little gem this morning.   Made a significant difference on my PC.

Here’s the best one. Add this to your web.config for MUCH faster compilation.

<compilation optimizeCompilations="true">

Quick summary: we are introducing a new optimizeCompilations switch in ASP.NET that can greatly improve the compilation speed in some scenarios. There are some catches, so read on for more details. This switch is currently available as a QFE for 3.5SP1, and will be part of VS 2010.

The ASP.NET compilation system takes a very conservative approach which causes it to wipe out any previous work that it has done any time a ‘top level’ file changes. ‘Top level’ files include anything in bin and App_Code, as well as global.asax. While this works fine for small apps, it becomes nearly unusable for very large apps. E.g. a customer was running into a case where it was taking 10 minutes to refresh a page after making any change to a ‘bin’ assembly.

To ease the pain, we added an ‘optimized’ compilation mode which takes a much less conservative approach to recompilation.

Problem with Jr. Admin security permissions in upgraded AbleCommerce 7 sites

As of Gold R6…

After upgrading an AbleCommerce 7.x website to AbleCommerce Gold, you’ll find the Junior Admin permissions do not work as expected.

In the Old Able 7.x, the role name was “Jr. Admin”.   However in Able Gold, the role name was changed to “Junior Admin”.  This value is hard-coded in various web.config files as well as the /app_data/adminmenu.xml file.

If you upgrade Able 7.x to AbleCommerce Gold, the value does not get updated.  As a result, the new Able Gold install cannot accurately identify a user as an admin user if they are a member of only the Junior Admins group assigned to the Junior Admin role.

The fix is simple.   Open the ac_Roles table in the database and replace the “Jr. Admin” value with “Junior Admin”.   Do the same for the lower case value as well.

How to remove full text catalog index from SQL 2005 database

When moving an older AbleCommerce 7 database from SQL 2005 to a newer SQL server, you might run into errors with the ac_searchcatalog full text index catalog file.   SQL 2008 doesn’t store FTS the same way it was done in SQL 2005.

The issue usually appears when you try to restore the database backup from 2005 to 2008 or greater.

To fix it, you have to remove the FTS file associated with the database.   But it’s not part of the SQL backup, so you have a problem if you didn’t copy the index file separately.   Here’s how to get rid of the index file reference.

Go into the old SQL server and run as follows:

USE <dbname>

SELECT name, ftcatid FROM sysobjects WHERE ftcatid > 0

For each returning table name (which are the tables with Full-Text Index), run this command:
EXEC sp_fulltext_table ‘tblName’, ‘drop’

After all table index references are dropped, get rid of the Full-Text Catalog with:
DROP FULLTEXT CATALOG catalogName

After this is done, don’t forget to remove the file by right-clicking the database, choosing Properties, and then click Files.

Amazon Orders Import for AbleCommerce 7

Wrapped up a nifty Amazon Order Import system for AbleCommerce 7 this week.     The client wanted to bring in all of their Amazon orders into Able so consolidated sales reporting would be possible.

The import routine supports importing orders by date range, is totally aware of orders already imported and even maintains separate import logs for easy management.

Currently it’s designed assuming Amazon fulfilled the order.  So there is no posting back to Amazon to indicate the Able shipment status etc.   I’d love to work with a client that wants full two-way processing of Amazon orders via AbleCommerce 7. 

This programming would require modification to work in AbleCommerce Gold.   However the effort would not be significant.

AbleCommerce CAPTCHA missing on login page

Several times I’ve run into the situation where I have moved an AbleCommerce store and CAPTCHA is broken.   Login page works fine, it just doesn’t show the CAPTCHA image.

The problem (at least in my situation) was when I’m moving these sites, I’m updating them from ASP.Net 2.0 to 4.0.   To do this, I use the appropriate web.config file from the /Install/Framework/ folder provided by AbleCommerce.

The only problem is the replacement web.config does not include the appropriate HTTP Handlers to drive the CAPTCHA control in AbleCommerce.

The solution is simple.   Directly above the <httpModules> section in the web.config, add:

<httpHandlers>

            <add verb="*" path="Captcha.ashx" type="CommerceBuilder.Web.CaptchaGenerator, CommerceBuilder.Web" />

</httpHandlers>

And now the CAPTCHA will work again in AbleCommerce.

How to improve Quickbooks Web Connector Speed

For years I have worked to improve the transfer speed of my AbleCommerce Web Connector for Quickbooks. But there’s only so much you can do in code. The rest is up to the internet connection, the speed of the Quickbooks PC and Quickbooks itself.

A client of mine found a document that details how to increase the cache memory allocation of the Quickbooks database engine. So he passed it along to me to try.

Why increase the cache memory you ask? Because the default is a whopping 512mb of RAM. Even if your PC hosting the quickbooks company file has 8gb of RAM, the database engine will only ever use 512mb. Way to keep up with the times Intuit.

Read the attached document and follow the steps. It will require a change to the registry. So know what you are doing, or find someone who does.

The reward is worth it. My larger QB connector clients were taking 2.5 hours to transfer 300+ orders in a single transfer session. Now it takes 20 minutes. Yeah. You read that right. 20 minutes. Same internet. Same PC. 20 minutes instead of 2.5 hours. That’s how much of a difference this can make for your QB installation.

Here’s the PDF.

InfusionSoft API for AbleCommerce

Having a blast putting together a nice integration between InfusionSoft and AbleCommerce. 

So far I can:

  • Push new contacts into InfusionSoft from AbleCommerce user records
  • Look up existing InfusionSoft contacts
  • Identify all InfusionSoft tags
  • Assign existing InfusionSoft contacts to tags
  • Update custom InfusionSoft fields

The API for InfusionSoft is pretty slick.  Implementing it using the necessary 3rd party library wasn’t hard either.  But putting together the necessary classes to drive the integration took a little more effort than I expected.

Looking forward to seeing this fully automated in the post-checkout routine.  It’ll really save the client a ton of time, no more re-entering customers into InfusionSoft.

How to force HTTPS/SSL in AbleCommerce Gold

Just like AbleCommerce 7.x, AbleCommerce Gold uses a specific configuration file to identify which pages/folders should force SSL.  Obviously key pages like the login page, the admin pages, checkout etc are all set to force SSL by default. 

But sometimes you need your own custom stuff to force SSL.  In my case, it’s my Quickbooks Connector for AbleCommerce.  The Intuit Web Connector program will only transfer to a public IP using HTTPS.  Any attempt to do so with straight HTTP will result in an Authentication Failed error response.

To force SSL connection on a specific page/file in your AbleCommerce Gold install, edit the /App_Data/ssl.config file and add the appropriate file name.  You’ll see the necessary syntax with the other entries in the file.

Make sure the file name is in all lower case in the ssl.config AND the actual file on your drive.    Able has had some issues with failing to recognize filenames when the case is not the same between what’s in the ssl.config and the actual file itself.  This was supposed to be corrected in Gold R3 however that has not been confirmed as of this writing.

AbleCommerce IE10 and Windows 8 problems

IMPORTANT UPDATE from AbleCommerce

Microsoft has confirmed that there are known issues when using the latest IE10 browser and certain code that might be in Asp.Net 2.0 or Asp.Net 4.0 sites. All AbleCommerce 7.0.x stores are affected by these issues, so you should carefully read the available options and take corrective action.

!. Javascript disabled in IE10 due to outdated browser definitions file

2. ImageButtons do not work in IE10 when using .net 4.0 and older

Microsoft has made an official patch available for one of the issues. It is unknown, at this time, if Microsoft plans to release another patch for the second issue. As such, AbleCommerce is providing a work-around that can be applied to your AbleCommerce store.

You should fix both issues by following the instructions found on the AbleCommerce help site.

http://help.ablecommerce.com/index.htm#upgrades/ac7_aspnet/tech_bulletins/asp.net_2.0_and_4.0_with_ie_10.htm

Exporting data to CSV with French characters in ASP.Net

For the longest time, I’ve used a nifty little export routine that takes any DataTable and pushes it to the browser as a CSV file.  This makes it extremely easy to incorporate an Export to Excel feature into any custom report.

An international client recently requested support for French accent characters.  This was new to me, I didn’t even realize it wasn’t working.   I try to stick with knowing one language at a time Smile

Apparently the necessary encoding is implemented in the web page by default.  That’s why it looks ok in the browser.  But when the CSV is being streamed to the browser for download as a file, the encoding does not default to the same.

The fix was easy enough:

Response.ContentEncoding = System.Text.Encoding.UTF8; 

Response.BinaryWrite(System.Text.Encoding.UTF8.GetPreamble()); 

 

*POW* Now the CSV has the proper characters for French accent letters.