Monday, January 22, 2007
Deploying a Windows 2003 cluster using VMWare
Whenever a virtual machine was powered on, it used to lock the vmdk files thus not allowing the second node in the clustered to be powered. After some searching on various blogs, I was able to work around this problem by modifying the vmx file of the virtual machine to include the following statements (without the comments)
scsi0:sharedbus="virtual" //this shares the whole scsi bus 0
scsi0:0.shared="true" //this shares the scsi0 port 0
disk.locking="false" //for disk.
Removing the Quick Lauch in Sharepoint sites
< style>
.ms-navframe
{
display: none;
}
</style>
Wednesday, March 29, 2006
Mounting ISO files
mount -o loop -t iso9660 isofilename mountpoint
Tuesday, January 24, 2006
Populating a combo box with enumerations
private void populatecbo(System.Type enum_type, System.Windows.Forms.ComboBox combo)
{
Array arr_populate = Enum.GetValues(enum_type);
combo.DataSource = arr_populate;
}
A cast to type using typeof(enum_type) would be required during the call
Also retrieving the value would be easy
(enum_type)System.Enum.Parse(typeof(enum_type), combo.SelectedValue);
Monday, January 23, 2006
Opening Excel files in a browser in ASP.NET
string fileName = Server.MapPath("HelloWorld.xls");
Response.ContentType = "application/vnd.ms-excel";
Response.WriteFile(fileName);
However, this was opening the file in the same webpage and the back button was not having the desired effect of moving back to the initial page. After some attempts I found a simple way to get that to work correctly:
I declared a class
public class ExcelFile
{
public static string excelFileName;
}
set the static variable to the required filename, redirected the output to another page and used the same code in the page_load event:
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
Response.ContentType = "application/vnd.ms-excel";
Response.WriteFile(ExcelFile.excelFileName);
}
Monday, January 16, 2006
VMWare Player
More information in this regard would be available at :
http://www.vmware.com/products/player/
Saturday, December 24, 2005
AJAX
I read quite a bit about AJAX lately and was amazed by the simplicity and the efficiency that it brought about in web applications. However I realized that this was not something new. The most interesting thing in this is the reduction of postbacks leading to improvement in performance. About a couple of years back, one of my friends had shown me a online chat demo available at http://www.volano.com which implemented something like this. The primary reason of the hype for AJAX seems to be because big players like Google have implemented it (gmail) and there are other ambitious projects like WebOffice.
Tuesday, December 13, 2005
Memory leaks and Undisposed objects
Recently while working on a couple of issues related to memory leaks due to undisposed GDI objects, I came across this excellent post related to using tools to track down and eliminate memory leaks in managed code.
A couple of posts had a great sense of humor
A few good (performance) men
10 reasons why you should subscribe to my blog
Hats off to Rico Mariani.
Sunday, December 04, 2005
CompactFramework and Virtual Machines
I have worked for quite some time on Virtual machines and have also worked on CompactFramework in Dotnet. However I have never been able to run an emulator on a virtual machine using DotNET 1.x. There were many explanations that I had come across in this regard
1. There cant be two layers of virtualization.
2. The WinCE emulator uses the same engine as Virtual PC. (Both have been developed by Connectix). Virtual PC2004 and Virtual Server 2005 are based on this engine and so it is not able to run a copy of the emulator inside itself.
However I did some research on this and was not convinced with either of the reasons. VS.NET 2.0 (Whidbey) allows an emulator to be run from within a Virtual machine. The reason may be that this uses a different emulation engine. Also, when I had tried to run an emulator from a VMWare virtual machine, it failed to run on that too. I feel that I need to gain more gyan on this.
Gecko browsers and ASP.NET
ASP.NET has left me high and dry when I try to render web apps on a Gecko browser. I aint sure why this happens, but sometimes scrollbars appear on different parts of the browser, CSS styles appear to have taken a beating. I did a little googling on this and found out that it is not just ASP.NET but IIS also, which may be responsible for this.
The following modifications were suggested in the web.config file
< browserCaps >
< !--Gecko based browsers //-- >
< case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)? (?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*" >
browser="Gecko"
type=${type}
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
< case match="rv?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))" >
version=${version}
majorversion=${major}
minorversion=${minor}
<case match="^b" with="${letters}" >
beta=true
</case>
</case>
</case>
</browserCaps>
There was another suggestion to use the following in the @page directive
clienttarget="IE5"