Sidebar 1: Configure Web Server for Hosting .NET Client Controls


Background: .NET controls are always stored in .NET assemblies which typically are (Windows) DLL files. When such a file is referenced in a browser some special treatment of a DLL file on the web server has to be considered. This is not only true for the Microsoft Internet Information Server (IIS) - where hints can be found for this case in the developer documentation and on many places in the Internet - but also for the Apache web server.



For IIS the job is normally done by copying the DLL file to some virtual directory. But if the directory is configured to hold Executable And Script the web server will treat the DLL file as an (ISAPI) extension - kind of in-process version of a CGI executable - and try to run it on the server itself. This will generate some strange behvaiour.

Regarding Apache there is quite another problem. Requesting a DLL file may report the wrong content type to the browser which then will not be willing to check if the file indeed is a .NET assembly. A .htaccess entry can than be used to map DLL files to the correct content type. So append the line AddType application/octet-stream dll to the configuration of the virtual directory or in some parent directory.


Back to List of Sidebars

Back to Projects Home Page