New DevExpress Web.Config Settings

ASP.NET Team Blog
06 May 2010

Starting with DXperience v2010.1, we’re making a small and useful change. We’re adding a new section to the web.config file for settings used by DevExpress ASP.NET controls.

New Section

Here’s the default section that you’ll find at the bottom of a new web project using DXperience v2010.1 release:

<devExpress>
  <compression enableHtmlCompression="false"  
               enableCallbackCompression="true" 
               enableResourceCompression="true"  
               enableResourceMerging="false" />
  <themes enableThemesAssembly="true" />
  <errors callbackErrorRedirectUrl="" />
</devExpress>

Upgrading Simplified

Your current website will not break due to this new section. We’ve added backward compatibility for our previous settings. Therefore, if there are any old DX appsettings in your web.config file:

  1. They will work without any issues.
  2. They will be replaced/updated with our new config section when you open your ASPX page in designer mode. Of course, your previous settings and values will not change, they will be simply moved to the new section.

Even with backwards compatibility, I recommend updating to the newer settings. This can be done easily by opening one of your ASPX pages in the designer mode.

Settings Explained

The <compression> settings relate to the 4 settings introduced last year that help increase your website’s performance:

From 4 Settings To Improve DevExpress ASP.NET Performance blog post:

  • enableHtmlCompression – Compresses HTML output to the client browser including AJAX callbacks (false by default)
    • To compress individual pages, use the DevExpress.Web.ASPxClasses.ASPxWebControl.MakeResponseCompressed() method.
  • enableCallbackCompression – Compresses AJAX callbacks (true by default)
  • enableResourceCompression – Compresses scripts and CSS files (true by default)
  • enableResourceMerging – Combines all scripts in one file (from different assemblies) and merge all CSS-files in one file. Reduces server requests. (false by default)

The <themes enableThemesAssembly=”true” /> setting means that you’ll get better performance from our enhanced ASP.NET Themes DLL.

The <errors callbackErrorRedirectUrl=””> helps you to redirect to another URL when an error occurs within a callback. To learn more, check out the “Redirect Callback using an ASPxHttpHandler Module” video.

Why The Change?

To ensure that DevExpress settings are not confused with standard Visual Studio web.config settings, we’ve decided to separate the settings into our own section.

Also, many of the above settings relate to our special ASP.NET HttpHandler module, the ASPxHttpHandlerModule. This section also contains other settings like the callbackErrorRedirectUrl. And we have plans to use this section for other settings in the future.

Having our own IntelliSense support in the web.config would help to avoid typos, which is why we’ll be adding IntelliSense for our web.config settings in a future release. Unfortunately, there’s a bug in VS2010 that prevents us from adding it but we’ll add it as soon as the bug is resolved.

Your Feedback Matters

Crono's Avatar

Of course, this was originally a customer suggestion, so thanks for the feedback, Crono.

To recap:

  • New ASP.NET projects using DXperience v2010.1 and beyond will use the new <devexpress> web.config section to manage global settings of your web sites and applications.
  • Our older web.config settings are backwards compatible.
  • You can easily upgrade our older settings by opening one of your project’s ASPX files in the Visual Studio designer mode.

Drop me a line below with your thoughts on this change?

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.