Archive for the ‘Technology’ Category
Friday, December 4th, 2009
In basic terms, VirtualWiFi in Windows 7 is nothing but, connecting to multiple IEEE 802.11 networks using one WiFi card.
VirtualWiFi is a project Microsoft have been working on from 2002. Not being worked on now, not event supported by Microsoft research. They have provided VirtualWiFi OID support in Windows 7.
(more…)
Tags: Windows 7 VirtualWiFi, Windows 7 VirtualWiFi Basics
Posted in Technology | No Comments »
Wednesday, February 18th, 2009
With Windows Vista getting popular and Windows 7 fast approaching there will soon be a lot of applications running on these platform. Some of the scenarios need to read the OS name dynamically from code. The commonly used method is to extract the OS name using System.OperatingSystem object. It provides a Platform and version number using which you can deduce the OS name.
(more…)
Tags: .Net, C#
Posted in .Net, C#, Technology | 4 Comments »
Wednesday, January 14th, 2009
I love the really cool Action Filter’s in ASP.Net MVC. I use it to keep my code clean and reusable. This post is not about what is an Action Filter but is more about how to use them to have cleaner and reusable components.
(more…)
Tags: ASP.NET MVC
Posted in .Net, ASP.NET MVC, Technology | 1 Comment »
Tuesday, December 23rd, 2008
Sometimes we need to expand the TextBox dynamically based on the length of the entered text. TextBox does not have a AutoSize property by which it can adjust it’s size based on the content. On way of calculating the Width for the TextBox is using the Graphics.MeasureString and calculating the Pixel width. This method has it’s Pros and cons.
(more…)
Tags: .Net, C#, WinForms
Posted in .Net, C#, Technology, WinForms | 1 Comment »
Thursday, November 20th, 2008
Ever wanted to find out the different drives or just the removable drives on the machine ?? The DriveInfo class is the answer to your prayers.
(more…)
Tags: .Net, C#
Posted in .Net, C#, Technology | No Comments »
Monday, October 27th, 2008
Generally we get the executing directory path using the HttpContext.Request.PhysicalPath etc. In IIS7 this won’t work. We cannot access the HttpContext.Request object in Global.ascx.
This is the way to do this,
int binPos = HttpRuntime.BinDirectory.LastIndexOf("\\bin");
string executingDirectory = HttpRuntime.BinDirectory.Remove(binPos);
Have fun.
Tags: ASP.Net IIS7;IIS7 Executing Directory
Posted in .Net, ASP.Net, Technology | No Comments »
Thursday, October 16th, 2008
This one really struck me hard. I am doing a threading scenario with some UI feedback marshaled back on the UI thread. And you won’t believe it, I am amazed to find CheckAccess missing from the Dispatcher object. Intellisense wouldn’t just show me CheckAccess(). Rubbing my eyes and again checking, it still seems to have vanished…
(more…)
Tags: WPF
Posted in .Net, Technology, WPF | 1 Comment »
Thursday, October 2nd, 2008
.Net 3.5 has introduced a new TimeZoneInfo class which is an improvement over the existing TimeZone class. The TimeZone class can work on local TimeZone only i.e. converting between UTC and Local time zone only. The new TimeZoneInfo class provide much more richer functionality of working with different other Time zone’s.
(more…)
Tags: .Net, C#
Posted in .Net, C#, Technology | No Comments »
Thursday, September 25th, 2008
Well, yes, it looks like trivial but it isn’t. Many a times we need to get the IP address of the user. There are a handful of suggestions to do this. I discuss the methods and the short comings in them.
(more…)
Tags: IP Address, User IP Address
Posted in .Net, ASP.Net, Technology | No Comments »
Tuesday, August 5th, 2008
Certain times we get an error while attaching an mdf file saying,
“The file “D:\DataBaseFile.mdf” is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Could not open new database ‘D:\DataBaseFile.mdf’. CREATE DATABASE is aborted.”
(more…)
Tags: is compressed but does not reside in a read-only database or filegroup. The file must be decompressed., SQL Server Attaching a database error
Posted in SQL, Technology | No Comments »