Tuesday, February 22, 2011

Running WordPress as Sub Domain of AspDotNetStorefront Edit Image Error

Version: ASPDotNetStorefront 9.x ML & MS

WordPress generates an error when trying to edit an existing image in a blog.

AspDotNetStorefront is the primary site. WordPress is a subdomain of the primary site e.g. mydomain.com/blog.  WordPress is installed on the same server.  Server is Windows 2008R2 with IIS 7.5.

By default, a subdomain will inherit it’s parent web.config settings.  It’s not possible to use the <location path="." inheritInChildApplications="false"> tag since this will prevent all subdomains from inheriting the parent web.config and this will break admin.

Instead, include the following settings in your WordPress web.config.  Be sure to preserve any existing WordPress web.config settings and simply add the settings below.

            <remove name="RegisterRoutes" />
            <remove name="ScriptModule" />
            <remove name="UrlRoutingModule" />
            <remove name="OnErrorHandler" />
            <remove verb ="*" path="execpackage.aspx" />
            <remove name="RegisterRoutes" />
            <remove name="ScriptModule" />
            <remove name="UrlRoutingModule" />
            <remove name="HtmlPages" />

Friday, February 4, 2011

AspDotNetStorefront Monthly Maintenance Time-Out Error

Version: AspDotNetStorefront (including multi-store and SP1)


When running monthly maintenance a timeout error is generated.


Run the monthly maintenance SQL directly on the database.  Important: only attempt this if you have a full backup of your database and have inspected each and every SQL parameter below and understand the full implications of running this stored procedure.  This is meant as a technical reference for developers and database administrators only.

aspdnsf_MonthlyMaintenance @InvalidateCustomerCookies=0, @PurgeAnonCustomers=1, @CleanShoppingCartsOlderThan=0, @CleanWishListsOlderThan=0, @CleanGiftRegistriesOlderThan=0, @EraseCCFromAddresses=1, @EraseSQLLogOlderThan=30, @ClearProductViewsOrderThan=180, @EraseCCFromOrdersOlderThan=30, @DefragIndexes=1, @PurgeDeletedRecords=0

In version 9.x, the monthly maintenance admin routine will also “Clear Profiles Older Than”.  This is a separate SQL statement not included in the stored procedure above.  The Profile table can grow large quickly and old data must be removed.  e.g. delete profile table rows > 30 days old:

delete from Profile where UpdatedOn < dateadd(d, -30, getdate())