TEC-IT
TECIT
Bookmark 

FAQ: TBarCode .NET

FAQ TBarCode .NET: Caching Barcode Images in ASP.NET Applications
 

Streaming Performance

Caching Barcode Images in ASP.NET Applications

File based caching

The CacheDirectory property only accepts virtual paths from the web server. It is not possible to use a physical path such as c:\temp. Temporary barcode images should be created within the local (virtual) application directory (where you can find the *.aspx files) or in a subdirectory.

Cache="Harddisk" 
CacheDirectory="." or CacheDirectory="barcodefiles"

Memory based caching

With the following setting all barcode images will be stored in the web server's cache memory:

Cache="Memory"

In order to use memory caching you must include a custom HTTP handler BarcodeHttpHandler in the <httpHandlers> section of your web.config file (you might need to create this section first, if it does not exist). It should look similar to this:

 <system.web>
  ...
  <httpHandlers>
    ...
    <add verb="GET" path="BarcodeHttpHandler.axd" 
               type="TECIT.TBarCode.Web.BarcodeHttpHandler,
               TECIT.TBarCode, 
               Version=7.0.2.0, Culture=neutral, 
               PublicKeyToken=1B5F4306B234B83D" />
    ...
  </httpHandlers>
  ...
 </system.web>

Based on the example shown above, you probably need to change the version number depending on your package. Under c:\windows\assembly, look for TECIT.TBarCode to find the correct version.

If you need more detailed instructions go to:

> Start Menu > TEC-IT TBarCode 8.0 > Developer Manuals > .NET > TBarCode .NET Developer Reference (BarcodeHttpHandler Class)

TEC-IT

© TEC-IT Datenverarbeitung GmbH, Austria  ++43(0)7252/72720  office@tec-it.com