Web Dev Matters and Me

Web Development Matters - HTML, XML, C#, .NET, AJAX/Javascript(jQuery), CSS, XML-XSLT

ME - LIFE,Philippines, Tokyo, ECE, PhilNITS/JITSE,情報処理, 日本語

things about Philippines, gaming, C# development and web development, how to make money in stock trading

Web Dev Matters and Me

Global.asax events are not triggered for static files

One of the great thing to handle dynamic website is to manipulate the output of the page by request. From writing handlers, modules or simply handling the Global.asax events. But just when you had that idea, something will discourage you to prevent using that idea and consider doing an even more tiring (and probably messy) way of doing.

To be able to handle static files in global.asax, we have to change something in the IIS. For 6 and below, it can be done on the server by checking the property of your website. On the application configuration (under home directory tab, click configuration button and the handler tab should be displayed), select a specific static file and click insert. Confirm that the "Verify that file exists" checkbox is NOT checked.


For IIS 7, this is a bit easier. Just be sure to have your application pool to be configured under "Integrated" pipeline and have these in the config file.

<system.webServer>
  <modules runAllManagedModulesForAllRequests="true" />
system.webServer>
 
After this, IIS  should really handle all the request.

IIS doesn't serve unknown MIME types

Ever experienced working on a web project that works perfectly on dev and stage servers then shows up 404 in production? I experienced this as was troubled for some time. Usually, production servers have limited access and configuring it might is probably out of option. 

good thing, it can be configured on your config file.

(lets assume a non-standard extension and treat it like an XML)


for IIS 7 and above versions.

   
                        
   



As for IIS 6, I think it is not possible to configure in config. You will really 
have to kneel down server admins, so deal with them even if they are stubborn.

Few basic things to speed up transition learning in XSLT

Holiday sure is short (although it was a 3 day holiday), especially if we can just realize that we got lots of things to do...

I was able to work on my XSLT templates, and saw how I wrote them few months ago.  I even laughed when I saw that I did a horrible for-each block, that can be solved by  using the concat function, or even simpler than enlosing things between a curly brace (in case of attributes).


It improved a lot, way cleaner than it was before and more "straight-to-the-point", if you know what I mean. we can just directly write the templates as if we're writing HTMLs, without having to nest xsl:elements and attributes..



FB Connect