I have some new additions and apps that I wanted to integrate into our company web (the company I work for) but this required upgrading from ASP.Net 1.1 to ASP.Net 2.0. Seems simple enough, right? I wish..!!
The site uses the MySql .NET Connector (a native ADO connector for .Net) available from MySQL AB. This worked flawlessly under the .Net 1.1 framework. I set up the 2.0 framework on our dev server and started testing the site localy to make sure all existing features and functions would still work after the switch. I am happy to announce that everything was working as expected (on the dev server). Now it was time to request the upgrade through the host. After receiving the confirmation that the request was completed, I open a browser and hit the company web. Warning Warning Error Error Error. Oh no!! What happened?
With the release of .NET 2.0, Microsoft included a new security model using a greater level of restriction. The host that is hosting our web makes use of these restriction levels and as it turns out, the .Net connector that we were using violated some .Net security and triggered a Security Exception.
Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.
I have to give Props to Microsoft for making the problem easy to identify. Looks like all I need to do is allow partially trusted calls from the MySql connector.
Here is where the Beauty of Open Source Software comes in.
MySql creates open source database software and tools and freely makes their source code available to anyone who wants it. That means I can take the source, make the changes I need and recompile the binaries again.
But wait! How do I access the source written in C# and recompile the binaries. Don’t I need something like Visual Studio from Microsoft. Thats like $1,024.99 (quoted from Amazon).
Sure you could drop a grand for VS Pro, or you could download SharpDevelop. SharpDevelop is the IDE equivelant to Visual Studio for C# development -and- did I mention it is FREE!! Yup that’s right Free Open Source Software (FOSS). I’ve been using SharpDevelop for a while now, and wouldn’t think of giving it up.
I fired up SharpDevelop, made the changes to the MySql .Net connector source necessary to allow it to operate within the restricted security settings of the host’s servers, and recompiled the binaries. As soon as I uploaded my newly compiled MySql Connector to the web server, I opened up my browser of choice and hit the company web site.
SUCCESS!!! All is good in the world again.
So how did using open source provide the advantage here?
1. if the MySql connector were closed, meaning I was not able to alter the code, I would have had to contact the company behind the software and try to get them to work with me towards a solution. The truth is, that is a long process and would probably require that I wait for them to release a new version of their closed proprietary product. With an inoperable web site, that was not an option.
2. Having access to FOSS (Free Open source Software) like SharpDevelop allowed me to do the same thing that other high priced software does, but for a lot less.
In the End, I was able to resolve a high priority issue quickly and at a low cost.
In all fairness, Microsoft does provide a -freely available- (for the beginner) version of Visual Studio IDEs know as Visual Studio Express. However, these are not Open Source and are very limited not only in features, but also in licensing which states what you are allowed to do with the projects you create.