June 28, 2011

Sitefinity 4.1 problem uploading images with admin tools

We suddenly encountered an issue when uploading images using the Sitefinity 4.1 back-end admin tools. Now suddenly, when the content creators attempted to upload an image, they were suddenly getting a 404 error with the message:

Please review the following URL and make sure that it is spelled correctly.
Requested URL:
/Telerik.Sitefinity.AsyncImageUploadHandler.ashx


...Of course this functionality worked just fine in the development environment. The entire site was republished to staging, but they still were experiencing this issue of not being able to locate AsyncImageUploadHandler.ashx.

After examining everything, it ends up that there were several new httphandlers added in the system.webServer section in the local web.config that needed to be added to the staging site's config, specifically in this case the missing offender was:

<add name="Telerik.Sitefinity.AsyncImageUploadHandler" path="Telerik.Sitefinity.AsyncImageUploadHandler.ashx" verb="*" type="Telerik.Sitefinity.Modules.Libraries.Web.AsyncImageUploadHandler, Telerik.Sitefinity" />

I assume these settings were added when we upgraded to 4.1, SP1. According to the upgrade instructions, upgrading locally and then publishing everything except the Sitefinity configuration files to staging will automagically update the remote site to SP1. But you also need to make sure to merge the updates to your web.config as well.

Share |

June 21, 2011

Referencing Sitefinity 4.1 Themes, CSS From External Pages

Global styling in Sitefinity 4+ is handled by creating and registering a theme, and then applying it using the admin tool to your Sitefinity page templates:


Pretty easy, but what about if you need to reference that style sheet from an external web page that wasn't created within Sitefinity? Or to reference it right from the markup of your page templates/master pages? Looking at the solution the path will be something like:

/App_Data/Sitefinity/WebsiteTemplates/HomePage/App_Themes/Teal/Global/main.css

But we know the ASP.Net App_Data folder has special permissions that will not allow us to directly reference files within it... if we try to use this path to reference the stylesheet, we'll get a 403 error.

Fortunately, after you register a theme, Sitefinity will automatically re-route directly from the /Sitefinity folder at the root of the application into the /Sitefinity folder that exists at /App_Data/Sitefinity... kind of a client-side backdoor into your themes and templates.

So the easy answer to referencing your Sitefinity themes client-side, is just remove the "/App_Data" from the path. You can see this pathing structure if you look at the source code of your Sitefinity pages as well - example:

<link href="/Sitefinity/WebsiteTemplates/HomePage/App_Themes/Teal/global/main.css" type="text/css" rel="stylesheet" />

Share |

June 02, 2011

Sitefinity 4 "ExceptionManager Cannot be Constructed" error

If you're using Sitefinity 4.x and suddenly begin seeing this curious ASP.Net error:

"The type ExceptionManager cannot be constructed. You must configure the container to supply this value."


...this error results when the App_Data folder, and files within, are marked Read Only - if you're using TFS for source control, make sure your App_Data folder has been Checked Out. Your app should then launch normally.

Share |