Wednesday, September 24, 2008

Google Chart API control for ASP.NET

If you want to use charts in your web application, you should spend some time with Google chart api's. Very simple to use.  I also found an open source project which implements the google chart api as ASP.NET server control.

Here is the link to the Google chart API.

http://code.google.com/apis/chart/

 

Here is the link to the ASP.NET Google Chart Control.

http://www.codeplex.com/GoogleChartNet

 

I also found another interesting flash based open source chart project(OpenFlashChart) and here is the link to it,

http://teethgrinder.co.uk/open-flash-chart/

Friday, September 19, 2008

System.MethodAccessException - System.Data.Common.DataRecordInternal.get_Item(System.String)

Ever wondered what this exception is? I ran into this issue last week when i deployed my code in a shared hosting environment which was running in Medium trust. It was working fine on my local. After some research i found that this error was thrown by a Repeater control on a page whose datasource was a datareader. In a Medium trust environment, according to microsoft "Reflection is not allowed". Looks like when you assign a datareader to a repeater control internally it is doing some reflection which is causing this issue. Another strange behaviour with this error is it won't even tell you the exact error, instead it will be displaying something like this in a shared hosting,

Security Exception

Description:

The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.


Exception Details: System.Security.SecurityException: Request failed.


So how will you reproduce this error locally, there is setting you can add it to your web.config


<system.web>
    <trust level="Medium" />
</system.web>

So the workaround i have found for this issue is to use dataset instead on datareader. Let me know if you guys have found a different solution.

Wednesday, September 3, 2008

Continuous Integration

If you want to automate your build process then you are in the right spot. Continuous Integration is a process of automating the build process from various source control system. We have lot of free Continuous Integration servers in the market today. Here are few,


CruiseControl.NET

CI Factory

Team City



My favorite is CI Factory. These CI servers can talk with variety of source control system like Visual Source Safe, Subversion, CVS, Vault and VSTS Version Control.

They also support various plugins like NCover(Collects code coverage information), nDepend(Calculates code quality metrics), Simian (Detects copy and paste duplication), NUnit ( Unit testing).