.Net Framework 2.0 installed, but ASP.NET web apps still use Version 1.1

I recently tried to run some .Net 2.0 code on my testing web server (IIS 5). Now, my server has .Net Frameworks 1.1 and 2.0 installed, but when I tried to run some 2.0 code, I got a series of errors on the page with a small line at the bottom that said the page was executing under the .net 1.1 Framework.

I thought to myself, If the 2.0 Framework is installed, why won’t it just use that. So I open up the Internet Services Manager for IIS to see if there was anything there that could help me figure this little issue out. Well, as it turns out, you need to specify what framework a web uses to execute it’s code from within the IIS Manager console. These settings are found by right clicking on the target web site in the Manager console and selecting “properties”.

Now in the properties panel, select the ASP.Net tab. In this tab view you should see a form page containing a few fields and a couple buttons. The first field at the top of the form is labeled “ASP.Net Version” and has a drop down menu containing the available installed framework versions. Select the appropriate version you want to use to process asp.net pages for the web your working in and hit the “Apply” or “OK” button. That’s all there is to it! You can also specify different Frameworks for different webs that are hosted on the same server. One of the good things about the .Net Frameworks is that they install and run independently of each other.

Does Google have their eye on the “Apple”

By now you may have heard of Google’s new initiative known as “Android”. Android is Google’s new project set to bring an open source mobile platform based on the Linux OS to the cell phone market. So what does this mean for the cell phone and mobile markets? Google has created an alliance called the “Open Handset Alliance” including a selection of 34 market leading hardware, software and telecom companies.

Andy Rubin, Google’s director of mobile platforms, and Android project leader said the open-source strategy would encourage rapid innovation and lower the bar to entry in the highly competitive cellphone market, where software accounts for an increasing share of the cost of making a phone.

I believe most of the excitement surrounds the fact that this is, in some fashion, an “open” project which means more support from more providers, manufacturers, developers, and applications with lower costs. However, it is still unclear how “open” it will be and it is still possible that handset makers and operators will “lock” their own release and limit use to their own services or applications. Either way, this is in sharp contrast to Apple’s iPhone which is completely shut down, locked out and restricted to anyone outside Apple.

One thing to note is that there will not be an actual Google device (“gPhone”). Instead, the platform will be freely available to developers and manufacturers who will create the mobile devices to use the Android software.

Andy Rubin together with other members of the crew talk about the so-called Gphone.

It will be very interesting to see how this plays out over the coming months and year(s).

Exchange Server Dilema

A Quick Rant:

It is time to start planning for server upgrades at the company I work for. At the center of our network, we have an exchange 2000 server loaded with public folders. Public folders are crucial to our daily work and are used to organize all current publicity tours.

Unfortunately, Microsoft has planned to discontinue support of public folders after the Exchange 2007 release. From what I understand, they are available in the new release (2007), but not by default and will not be available in future releases. The system requirements also up the ante for an exchange upgrade, and our current hardware will need to be upgraded as well…which brings me to my dilemma.

I am leaning toward a recommendation for upgrading to Exchange 2007 and migrating to new server hardware required as well, …OR… do I consider the alternatives?

1) I have done some research on Exchange replacements and it seems that Scalix or Zimbra are as close as they come and they actually look pretty impressive. These run on linux based platforms and would run on existing hardware with public folder support. But this doesn’t come without it’s potential pitfalls.

The transition from Windows 2000 – Active Directory – Exchange combo to a Linux – LDAP – Scalix/Zimbra is not exactly an easy way out.

How does LDAP compare to AD for use with user/group authentication?
Can user and group accounts be transfered from AD to LDAP and maintain network permissions?
Can users be managed in the same way using LDAP as they are in AD?
Can I use Scalix/Zimbra with AD and forget the idea of needing LDAP? (after all, AD is pretty much just a modified LDAP).

2) Do I recommend the Exchange upgrade and try to find public folder replacement or develop a custom in-house replacement.

I like the idea of breaking the windows licensing trap and the potential savings, but at the same time, I am cautious about the support available with the alternatives, not to mention changes required make such a transition. I tend to think that the the second option is likely the easiest and more hassle-free of the two, however, I have yet to come across anything that works like public folders in a stand alone application.

Plutohome, Asterisk and a X100P FXO Card

So I have been working on setting up a fully integrated home automation system available from PlutoHome.com. If you are not aware, PlutoHome is home automation system available to the open source community with features to satisfy everyone from simple home controls, to advanced voip and media integration.

My latest venture into setting up a complete automation system is to integrate my voice network with the built-in Asterisk server installed with PlutoHome. The first step was to set up and configure two GrandStream Budget Tone 200 sip phones. Pluto’s plug and play detection picked up the phones as soon as I connected them to the network and installed the necessary software needed to work within the system. Some quick additional settings within each phone and I was able to make calls over my internal network from one phone to another.

The next step was to set up in and outbound calling from the PSTN.
I installed a X100P FXO card from x100p.com and this is where the trouble started.

After installing the card into an available PCI slot, my PlutoHome system did not seem to detect it even after rebooting. I tried some of the common commands from a terminal window, but had no success.

The solution it turns out was to compile and install the Zaptel drivers available from Digium. For what ever reason, PlutoHome does not include (at least as far as I could see) full zaptel support.

After installing and configuring zaptel, I was able set up inbound and outbound calling over the PSTN from my PlutoHome system.

In a later post, I will describe the process I used to install the zaptel drivers.

LG will use ZigBee Wireless for LG HomNet system

LG has announced that they will adopt ZigBee technology to power their HomNet System. LG, one of the leading providers of home appliances and entertainment equipment/devices is lending some much needed support to the ZigBee technology at a time when it’s reliability is being questioned.
I will not hide the fact that I am a fan of Zwave for no other reasons than I really like the protocol and it just works coupled with the recent disclosure of an “independant” study stating that other wireless networks sharing the 2.4-GHz band (wireless home networks /WLAN, microwaves, cordless phones, garage door openers), cause ZigBee signals to decay, and in some cases, fail completely.

As far as the studies go, I cannot say if there was any bias involved or support from other competitors (read: z-wave alliance <wink> ), but if there is any truth to the statements, then I for one will be seeking real data to contradict the statements.

The whitepaper created from the study mentioned above.

Installing LinuxMCE 1.1 Beta 2 – The Good, The Bad, and The (mostly) Ugly!

I have been using PlutoHome as a home automation solution to control lighting, media (A/V), and my home phone network. LinuxMCE is a direct branch of PlutoHome originally ported to run on top of an Ubuntu Desktop. With the latest Beta of LinuxMCE, the desktop of choice is now Kubunu, the KDE version of Ubuntu. This change was made in order to overcome a limitation of Gnome’s X11 implementation that is not apparent in KDE.

To start things off, I downloaded 3 ISO files.

  1. Kubuntu install disk
  2. LinuxMCE Packages disk
  3. LinuxMCE Cache Disk

The LinuxMCE Packages and Cache disk are available as a single torrent file.

After downloading the ISO files, they were burned to CD using Nero.

Installing Kubuntu:
The first step to the actual install is make sure the target system is able to boot from a CD. This can be set by accessing the system BIOS, and setting the CDRom as the first boot device in the boot sequence. Refer to you Motherboard’s BIOS information for instructions on setting this up. Continue reading “Installing LinuxMCE 1.1 Beta 2 – The Good, The Bad, and The (mostly) Ugly!”

Referencing ASP.NET CheckBox Controls using strings and casting

Category: Code ModeASP.NET – I recently ported one of my older web ASP Application to a web ASP.NET Application which presented a few challenges along the way. One of these challenges was a need to manage a series of 30 check boxes within a form. This part of the application is used to manage user permissions, restricting what areas of the application individual users had access to.

The user permissions are stored in a database as a pipe (“|”) delimited string. when the page containing the form loads, the permission string is pulled from the database, and split into an array.

When loading a page, all the checkboxes that indicate a users permission need to be checked.

In good ol’e fashioned ASP, all the checkboxes in a form would be given the same “name” attribute, and a “value” attribute containing the permission string. When the page containing the form was loaded, a piece of client-side javascript would run and iterate through all the checkboxes. For each checkbox in the form, the script would then iterate through each permission array item and if the item matched the checkbox value attribute, the checkbox state would be set to “checked”.

ASP Form

<form name="permissions" method="post" action="process_page.asp">
 <table width="461" border="0" cellspacing="0" cellpadding="0">
   <input type="checkbox" name="setPermission" value="user_add">Add</ br>
   <input type="checkbox" name="setPermission" value="user_manage" />Manage</ br>
   <input type="checkbox" name="setPermission" value="user_delete">Delete</ br>
   <input type="checkbox" name="setPermission" value="user_edit"> Edit</br>
   <input type="checkbox" name="setPermission" value="user_setVisibility" /> set visibility</br>

When the ASP page is submitted after altering user permissions (checking or unchecking boxes), server-side code gets the values of all the checked checkboxes using Request.Form(“Checkbox_name”) .value, converts it to a pipe (“|”) delimited string, and updates the database with the new delimited string.

When porting this to ASP.NET, we run into a problem when replacing the standard form checkboxes to ASP.NET CheckBox Controls. .Net CheckBox controls cannot have the same “name” attribute so we cannot access them as a group like we did in ASP. A workaround for this is to give each CheckBox Control an ID equal to the permission value.


<form action="" method="post" name="CMSForm" id="CMSForm" runat="server">
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
   <td class="p_text1" width="67">
    <asp:CheckBox ID="user_add" Text="Add" runat="server" cbValue="add_user"/>
    <asp:CheckBox ID="user_manage" Text='View/Manage' runat="server" cbValue="view_user_manager"/>
    <asp:CheckBox ID="user_delete" Text='Delete' runat="server" cbValue="del_user"/>
    <asp:CheckBox ID="user_edit" Text='Edit' runat="server" cbValue="edit_user"/>
    <asp:CheckBox ID="user_setVisibility" Text='Set Visibility' runat="server" cbValue="hide_show_user"/>

Now for the FUN.NET

Now instead of using a full block of client-side javascript and nested loops as we did in ASP, we can access the ASP.NET CheckBox Controls directly using a few lines of server-side code and Casting.

The key to this is the change from using a “value” attribute to contain the permission value to using the Control’s ID to contain the permission value. Because the permission values are stored and pulled from a database, and split into an array, each array item can also be used to reference the CheckBox Controls directly without having to loop through each control.

To set the checked state of the CheckBox controls, we loop through the permissions array and Cast the string as a CheckBox Control allowing us to access that specific control.

I am using a MySql database here:
First we need to get or data from the database. “access” is the DB table column that stores my permission string for each user.

MySqlConnection MyConString = new MySqlConnection(...your datababase connection string here...);
MySqlCommand myCommand = new MySqlCommand("SELECT  access FROM <your dataTable> WHERE emp_ID = <unique ID of user you want to manage> ", MyConString);
MySqlDataReader dr = myCommand.ExecuteReader();

Next we get the string value of “access” and split it into an array.

catch(Exception ex){
 however you want ot handle the exception here
char[] splitter  = {'|'};
string[] arrPermissions = dr["access"].ToString().Split(splitter);


setCheckboxes Method (this is where the magic happens)
This method takes the permissions array as a argument, iterates through the array, casting the string value of each item as a CheckBox, and sets the Checked state of all matching CheckBox Controls.

private void setCheckboxes(string[] arrPermissions)
foreach(string strPermission in arrPermissions){
((CheckBox)this.CMSForm.FindControl(strPermission)).Checked = true;

The same technique can be applied to other .NET controls as well to change their attributes, styles, or whatever.
I could have just as easily changed the text of the controls using something like: ((CheckBox)this.CMSForm.FindControl(strPermission)).Text= “I am a CheckBox Control”;

PHP – Break the Web Shackles!

Code Mode IconOver the last couple years or so, my development focus has been on the .NET Framework and C# so, I’m sad to say, it’s been a while since I’ve written any “real” PHP code. I think the main reason for this is that I have been developing more and more desktop applications and less web applications. When I was writing web apps, I’d say my efforts were split pretty much down the middle between PHP and ASP. Then .NET came along with C# and I was hooked. I was able to continue to develop web apps but also transition to desktop development while using the same tools. C# definitely had an advantage here. But alas.. Continue reading “PHP – Break the Web Shackles!”