Monday, May 21, 2012
 
 View Article   
03

Finally Log4Net Dashboard is up and running on ASP.NET 2.0!

I did come across a couple of problems.

Delegates:

I hade some delegates methods. In ASP.NET 1.0 I had the delegate definition in the same source file where I did the actually implementing of the method, which worked well inn ASP.NET 1.0. But when I compiled the project in 2.0 I got the error message:

error CS0246: The type or namespace name 'ShowErrorMessageHandler' could not be found (are you missing a using directive or an assembly reference?)

I had to move the delegate definition (public delegate void ShowErrorMessageHandler(string Message)) out of the original file – which belonged to the subnamespace L4NDash.PageNewEvents and into the Global.asax.cs file. It was not enough to change the namesapace in the PageNewEvents file.

I can’t give any precise reason for this problem – but I suspect it has something to do with the new “Assembly model” in Asp.net 2.0.

Assembly names

My next problem was for sure due to the new Assembly model. In Log4Net Dashboard I have a handler responsible for handling a custom section in the web.config file.

In my web.config file this handler is defined in the element:

<section name="l4ndash" type="L4NDashConfig.L4NDashConfigHandler, L4NDash, . . . >

The type attribute is referring to a class L4NDashConfig.L4NDashConfigHandler (which must implement the IConfigurationSectionHandler) and the name of the assembly (…, L4NDash, ) where the class can be found.

But in ASP.NET 2.0, the assembly names are generated, so I could not use L4NDash as the assembly name.

Well to make a long story short – I ended up in pulling the config handler out of the project and define a new class project with it’s own assembly (L4NDashConfig.dll).

 

Well anyway, L4NDash is now running on ASP.NET 2.0

Post Rating

Comments

#
Monday, December 05, 2005 6:18 AM
George,

Firstly, I love L4NDash and will buy a license when my current web app is ready to go live. Secondly, will you be releasing the L4NDash version that's compatible with .NET 2.0 soon? I'm currently using version 1.2.

Thanks,
Brian
Georg Jansen
# Georg Jansen
Monday, December 05, 2005 2:47 PM
Brian,
Thanks for that kind feedback! – Always nice to know that people are enjoying L4NDash.
The 2.0 version of L4NDash (which will support .Net 2.0) will be release late this week.

Regards,
Georg
Georg Jansen
# Georg Jansen
Tuesday, December 06, 2005 11:36 PM
The 2.0 version is released see:



http://www.l4ndash.com/Default.aspx?tabid=65&EntryID=15


Post Comment

Only registered users may post comments.
Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement