Wednesday, December 22, 2010

Enabling HTTP compression of web-services on Microsoft Forefront TMG 2010


How to find whether the compression is enabled?
Use Firebug (or similar tools) to inspect the HTTP request – it should contain the header:
Accept-Encoding: gzip,deflace
Then inspect the HTTP response, it should contain the header
Content-Encoding: gzip

Enabling compression on the IIS level
The content is served probably by an IIS web server, therefore you have to enable the compression there. There are two wals described in the following article:

Practical tip
Before you start digging into the Forefront setting, test the HTTP compression locally by bypassing any servers that may change the HTTP conversation. Your web site/service probably listens also on some local address such as http://localhost:12345 or http://server-name/web-site-name, etc. Use the procedure from previous paragraph to test, whether the IIS compresses the content.

Note
You do not have to compress the content by the IIS and let only the Forefront server to do that. This depends on your decision about the network topology and the way you access the web-site (Are there any clients accessing the web site directly? Do they need the HTTP compression?)
Enabling compression on the Forefront TMG (similar for Microsoft ISA Servers)
Now you have to configure the Forefront TMG server to use the compression for your web site (and for the web service responses). Follow the following article:

The compression is applied selectively, based on particular content-types transmitted through the Forefront server. By default, only HTML and text documents are served (this is quite smart as it makes no sense to compress some content – such as images, ZIP files, etc. – twice). Unfortunately the web service response is server as a XML content (having text/xml mime-type). To compress this type of content, you should add new content-type (using the following article):

And then you have to enable the compression for this content type (previous link http://technet.microsoft.com/en-us/library/cc995193.aspx)

Practical tip
Unless you are really sure by the routing of request between different Forefront named-objects, try adding more general objects (such as Anywhere) in the tabs of objects on which the Forefront server applies the compression. Once your compression will be up and running, you can again narrow the definition of compressed objects.

Tuesday, July 13, 2010

My new keyboard - Trust Isla


I always liked Mac things, especially the way they look like. This holds also for keyboards, although I've never used it for a longer time. Recently I've seen great-looking Mac-like keyboard Trust Isla (yeah, I know, Trust, but I've never had a problem with theirs warranty :)).

The manufacturer pictures looked truly great, but I've learned not to believe them. I've been googling for some user picture of this keyboard, but haven't found anything. So I gave it a change and here are the photos.

I'm using it only for a couple of hours, so it's hard to say whether the keyboard is good or not, maybe I'll post some notes later. The first thing I've noticed - the keys are quite shallow (yeah, I'm a huge fan of old deep keyboards with classical layout :), as I feel comfortable with them). Maybe I get used to it. And don't be scared by the weird layout (it's the czech one). You'll we be surely able to get some normal one.

Sunday, October 11, 2009

Entis Cursors Summary

I've been thinking about cursors I've made a few years ago. So I decided to make a short summary about the life of these cursors.

We've got:
- original version for Windows/X11
- original mini-version for Windows/X11
- original left-handed version for Windows
- unofficial un-titled version here
- version for CursorXP/CursorFX here

Official web-site of cursors is at entis-design.com. The X11 version can be downloaded and discussed at kde-look.

According to Google, the Entis cursors are discussed/mentioned also on some other sites, some of them are in foreign language, for example:
- http://www.dl4all.com/desktop_enhancements/cursors/14589-19-windows-mouse-cursor-sets-new.html
- http://themes.5d6d.com/archiver/tid-2768.html
- http://bbs.cnplayer.net/read.php?tid-57423-uid-270.html
- http://www.creativosonline.org/blog/entis-cursors-cursores-para-windows.html
- http://sites.google.com/site/jyc860923/
- http://bbs.syue.com/redirect.php?tid=20959&goto=lastpost
- http://www.dl4w.com/desktop-enhancement/cursors/137-entis-cursors.html#comment
- http://www.instantfundas.com/2007/12/21-most-beautiful-mouse-cursors-for.html
- http://www.uushare.com/user/cemily/file/1799749
- http://www.ghacks.net/2007/12/20/use-custom-cursors-in-windows/
- http://thesiliconjungle.wordpress.com/2009/06/11/windows-xp-revamp-part-1-visuals/
- http://usefulcomputerhelp.blogspot.com/2008/03/new-mouse-pointer.html
- http://blog.tbits.ie/2009/09/mouse-cursors-ahoy/

There is also a small Windows XP bug which appears when dragging these cursors which is mentioned here.

So, I've computed the download stats altogether and it seems, that these Cursors have been downloaded 100533 times. At minimum. I'm quite happy for this project.

Sunday, August 2, 2009

Left handed cursors

Somebody asked me for left handed version of Entis cursors, so I've created one and placed it on entis cursors website. I hope that this guy is not the only person who will ever download it :).

And just a small update to my favourite software list - I've been using Unreal Commander for a few months, but since last version it suffered from several awkward bugs (besides some other were fixed). The release cycle of this piece of software started to be to slow to my needs, so I've switched to FreeCommander, which has less bugs (to be precise - less bugs in functions I use) and after a few minutes of configuration looks and behaves the same way as Unreal Commander or Total Commander. The main difference (that I've spotted) is, that it's not binary compatible with Total Commander plugins and add-ons (Unreal Commander was compatible), but it does not hurt me anymore.

Sunday, July 5, 2009

Laptop universal adapter frustration

My DELL D400 power adapter went off. Of course in the moment I needed him most. No green light, no power, just some silent beeping. So I decided to buy a new one. But since it takes quite a long time to get original Dell adapter, I instantly bought Trust Universal Power Adapter PW-2120. I have also verified, that this adapter is suitable for my laptop.

What a surprise - after setting the appropriate voltage and turning the notebook on - the adapter was working, but the battery was not charging. I did some googling and found out, that it is not a bug, it's a feature. It seems, that DELL is using some special chip inside of his adapters to ensure, that only original accessories is used. I've tried it on my second laptop (HP Compaq 6710b) and everything worked fine.

So I've understood that resistance is futile and ordered another one brand new DELL PA-10 Power adapter.

Friday, February 20, 2009

IIS 7 Integrated Pipeline Mode Problem

Our ASP.NET apps started to behave weirdly when running on IIS 7. We found out, that switching the IIS mode from Integrated Pipeline to Classic worked well. Lately I've done some debuging and found out, that after calling Response.End() in some click event, the IIS continued to process other events and methods, which included further successful (?!?) writing to the Response object (in our PreRender and Render event). Closing the socket using Response.Close() prevented this :))).

I have thought for all my life, that after Response.End, somebody tries to stop processing the page :).

Tuesday, February 3, 2009

We've experienced two weird issues using Microsoft Visual Studio 2005 on Windows Vista. Both are connected to developing web applications using ASP.NET and the Web Server which comes integrated into the IDE.

First thing is, that the localhost is not any more localhost. Due to the IPv6 mapping
in file c:/windows/system32/drivers/etc/hosts which looks like this
::1             localhost

it seems, that request from http://localhost:1111 (number varies) never hit the WebDev.exe. Commenting this line out using
#::1             localhost

overcomes this problem (unless you need IPv6 it probably won't be a problem).

Second issue was the already mentioned port number. When you hit the Start debugging button, Visual Studio launched Web server and automatically opened your favorite browser on that page. But in our case, the URL in browser contained different port number that the Web server has been running on. After some digging I have found this solution.