Friday, December 26, 2008

Get hosting environment

My friend asked:
What is easiest way to get to know about type of web server?

Why not with our age old friend 'telnet'?

[harsha@JD11AF08 ~]$ telnet 80
Connected to
Escape character is '^]'.
GET / HTTP/1.1

HTTP/1.1 200 OK
Date: Fri, 26 Dec 2008 16:36:23 GMT
Content-Length: 573
Content-Type: text/html
Last-Modified: Sat, 03 May 2008 10:52:12 GMT
Accept-Ranges: bytes
ETag: "72b52dbebadc81:20844d"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET



Same thing can also be obtained with HEAD

Tuesday, December 23, 2008

CLR version on client

Click once deployment requires CLR to be present on target machine to verify manifest. Following snippets help in detecting the same.

Snippets work with IE5+ and Firefox 3+ only. They fail with Chrome.

Server Side:

protected void Page_Load(object sender, EventArgs e)
bool clrOK = Request.Browser.ClrVersion > new Version(3, 0);
if (clrOK)
Response.Write("CLR Version : " + Request.Browser.ClrVersion);
Response.Write("This machine does not have Microsoft .NET Framework version 3.5 SP1. Install and try again.");

Client Side:

<script type="text/javascript">

DetectCLR(targetVersion) {
//Gets CLR version on IE5+ and Firefox 3+
var uagent = navigator.userAgent;

//Form regular expression
var clrRegExp = new RegExp(".NET CLR \\d.\\d.\\d{5}", "g");

//Get Matches
var clrversions = uagent.match(clrRegExp);

//Is CLR present
if (clrversions == null)
document.write("Please install Microsoft .Net Framework 3.5 SP1 and try again");

//Possible .NET CLR versions for v2 and above
//.NET CLR 2.0.50727
//.NET CLR 3.0.04506
//.NET CLR 3.5.21022
//.NET CLR 3.5.30729
var arraylength = clrversions.length;
var clrversiondetected;
for (var i = 0; i < arraylength; i++) {
//document.write(clrversions[i] + "</br>");
clrversiondetected = (clrversions[i] == targetVersion);

if (!clrversiondetected)
document.write("Please install Microsoft .Net Framework 3.5 SP1 and try again");
document.write("CLR Version : <b>" + targetVersion + "</b>");

return clrversiondetected;

Saturday, December 20, 2008

BOSS Linux - Bharat Operating System Solutions

I just came across BOSS.

BOSS (Bharat Operating System Solutions) GNU/Linux distribution developed by  C-DAC (Centre for Development of Advanced Computing) derived from Debian for enhancing the use of Free/ Open Source Software throughout India. BOSSGNU/Linux - a key deliverable of NRCFOSS has crossed another milestone by releasing version 3.0. BOSS GNU/Linux Version 3.0 is coupled with GNOME and KDE Desktop Environment with wide Indian language support & packages, relevant for use in the Government domain. Currently BOSS GNU/Linux Desktop is available in almost all the Indian Languages such as Assamese, Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Oriya, Punjabi, Sanskrit, Tamil, Telugu, Bodo, Urdu, Kashmiri, Maithili, Konkani, Manipuri , which will enable the mainly non-English literate users in the country to be exposed to ICT and to use the computer more effectively.