System.Security.SecurityException: Requested registry access is not allowed.

When using Exception Management Application Block I ran into the following error:

System.Security.SecurityException: The event source ExceptionManagerInternalException does not exist and cannot be created with the current permissions. —> System.Security.SecurityException: Requested registry access is not allowed.
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at System.Diagnostics.EventLog.CreateEventSource(EventSourceCreationData sourceData)
at System.Diagnostics.EventLog.CreateEventSource(String source, String logName)
at Microsoft.ApplicationBlocks.ExceptionManagement.DefaultPublisher. VerifyValidSource()

Darren J. McLeod has a blog post showing two possible solutions. I used the second one to create new event sources manually and then everything was fine.


Leave a Comment

Looking at Durango Framework for Adobe AIR development

Recently one of my co-workers brought AIR to my attention and to my surprise things look very cool. Looking at Durango Framework I think M$ has some catching up to do for Silverlight and RIA development in general.  Just the ability to execute the same applications in Web or Desktop is awesome which Silverlight can’t do.

I am not a big fan of ActionScript so Silverlight surely is hands down better in the sense that it can support multiple backend languages. I think it would be interesting if Adobe adds support for C# as a backend language!

Leave a Comment

Learning about AJAX Control Toolkit

For as long as I can remember I wanted to try out the AJAX Control Toolkit for ASP.NET but I have been lazy. Then I ran into a nice tutorial about AJAX Control Toolkit. You can view it here. Soon when I try creating custom controls with the toolkit I’ll post about it.

Leave a Comment

C# Inheritance Tutorial

C# inheritance model is quite simple to understand. Typical example would be a “Person” class that gets extended by “Employee” and “Customer” classes etc. I have defined two classes below to show the concept.

public class Person


public String Name;

public int ID;

public int Age;

public Person()



// Defined a virtual PersonType method

public virtual string PersonType()


return “Person”;



public class Employee : Person


// When employee constructor gets called, it also calls the constructor defined on the parent class automatically.

public Employee() : base()



public DateTime DateHired;

public overrides string PersonType()


return “Employee”;



Now the Employee class has all the fields defined in “Person” class available and in addition there is a DateHired field.

To use your classes:

Person person = new Employee();

This creates a new instance of an Employee class and puts the reference into the person variable. This is possible since the Employee class inherits from the Person class. If you call the PersonType method on “person” object instance what do you think will be the result?

“Person” or “Employee”?

The beauty is that the overridden method gets called even though the variable instance is of type “Person” and PersonType method returns “Employee”.

I’ll be posting more tutorials soon that build up on this one.

Leave a Comment

Looking at MySQL

I must admit that I have mostly worked with SQL Server and a little bit with Oracle. I am now getting ready to start a project that will work with MySQL. I was looking at few samples to see how to do different things. One of the coolest things I found in MySQL is the ability to do paging is very simple. Unlike Oracle or SQL 2005 which require complex SQL constructs to build a query that returns a subset of rows at a time, MySQL uses a very simple approach. MySQL uses a keyword called LIMIT and you can specify two values after LIMIT and they are used as the starting point and the ending point of number of rows.

So if you want to create a paged query in MySQL all you have to do is add LIMIT keyword at the end.

select * from `products` LIMIT 10, 5

This query above would return rows that are on positions 11, 12, 13, 14, and 15.

Simple isn’t it? Now match that SQL Server or Oracle!!

I actually never really had to write paged queries by hand as my favorite ORM product Quick Objects always took care of that for me. All I had to do was set two properties even with most complex joins/criteria based queries. Quick Objects guys are saying they will start supporting MySQL in the next release which should be due about now so lets see how that goes.

Another thing I found is the ability to do replication in MySQL. I haven’t fully gone through the docs but thats next.

Leave a Comment

A cool article that shows how to implement MetaWebLog API in .NET

I have been researching various blogging software and tools for last few days. Mostly out of curiosity I started looking at various published APIs that allow client side tools to interact with blogs. My curiosity led me to this cool article that shows how to implement MetaWebLog API in .NET. There are three main API sets that I came across and those are Blogger, MetaWebLog and LiveJournal. MetaWebLog from what appears to be is a superset to Blogger API, but LiveJournal is different.

The article goes into details on how to create an HttpHandler and then also define the MetaWebLog data structures. Checkout the article here.

Leave a Comment

Drawing in plain old javascript

I just found this really cool article that shows how to draw lines in javascript and then I found this tool called it is a diagramming tool built in ASP.NET and AJAX.


Comments (1)

Older Posts »