What is the need of extensions in the urls
Recently a user asked the following question in the microsoft's asp.net forum
Can I serve the asp.net pages without the extensions, like
http://site.com/page1 instead of http://site.com/page1.aspx
I thought its an interesting post. I thought of writing what is the importance of extensions in the url with respect to IIS.
The first thing that happens, when a user types in a url is, IIS receives the request for the page. IIS looks up at the extension of the url, and then decide what to do with it. Sometimes IIS handles the request by itself, othertimes it has to delegate the work to some other process, as I said its all based on the extension.
If the request is for, lets say for html page or for some image content or some other static content, IIS handles the request by itself.But if the request is for, lets say for a asp page (.asp extension), then IIS forwards this request to asp.dll ISAPI. Then this dll takes over the execution and serves the page back to IIS, which will send the response to the user. Similarly for asp.net pages (.aspx, .asmx, .ascx..), aspnet_isapi.dll handles the request, which will forward the request to the worker process, which will execute the application in an application domain.
So, all this forwarding to isapi dll's would not be possible without extensions in the url.
Comment Notification
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using
Comments