Wednesday, April 29, 2009

Enterprise Library error: Invalid TraceListenerData type in configuration

I got the following error message when I tried to run a correctly configured and valid Enterprise Library 4.1 Logger Application Block code:

ConfigurationErrorsException

Invalid TraceListenerData type in configuration 'listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Database.Configuration.FormattedDatabaseTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging.Database, Version=9.9.9.9, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx"'.

The documentation recommends the following:

To prepare your application

  1. Set a reference to the Logging Application Block assembly:
    • If you are using C#, in Visual Studio, right-click References in Solution Explorer, and then click Add References to add references to the Microsoft.Practices.EnterpriseLibrary.Logging.dll assembly, Microsoft.Practices.EnterpriseLibrary.Common.dll assembly, and Microsoft.Practices.EnterpriseLibrary.ObjectBuilder2.dll assembly.
    • If you are using Visual Basic, in Visual Studio, double-click My Project, click the References tab, and then click Add Reference to select the assembly. In the list of imported namespaces at the bottom of the tab, select the following check boxes: Microsoft.Practices.EnterpriseLibrary.Logging, Microsoft.Practices.EnterpriseLibrary.Common.dll, and Microsoft.Practices.EnterpriseLibrary.ObjectBuilder2.dll.

I have referenced all the assemblies above. After a few minutes I’ve realized I must also add a reference to Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll assembly.

If you are using the DatabaseTraceListener class, you must also do the following:

  • Configure the application to use the Data Access Application Block. For more information, see The Data Access Application Block.
  • Execute the script named CreateLoggingDb.cmd (located in the Source\Blocks\Logging\Src\DatabaseTraceListener\Scripts folder) to create the Logging database.

    Note:

    It is also a good idea to add a reference to the Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll to your project so that the assembly required at run time is copied to the output folder.

So if you store your logs in the database, don’t forget to add a reference to the Logging.Database assembly as well!

Tuesday, April 28, 2009

Ajax Control Toolkit stopped working

Ajax Control Toolkit has just stopped working recently. I didn’t understand why because every other site including the example site just worked well. So I checked the web.config and everything was correct. I’ve created a test page inside the web project, and that did not work. I realized that every single page that contained ajax did not work.

Well, I finally compared the web.config file to the latest SVN version. The main difference were the rewrite rules for IIS7, so I started checking them. Now I know that the reason of misbehavior was a rewrite rule that was applied to all the pages and redirected the ajax calls to a wrong place.

My advice: always check your rewrite rules. Just disable them all and enable them one by one.

Monday, April 27, 2009

Computer Course for Pensioners

Illustration: Education I’ve started teaching basic computer skills for pensioners at a local community center in Budapest, Hungary. It’s exciting! I wouldn’t speak about the personal side but I would say a few things about the professional side.

First of all it’s a great challenge. They have learnt in a different political and educational system and several years have passed since the last time they had to learn something brand new. It can be very hard to make notes on their own. It can be very hard to learn a technology that did not exist in their childhood (and probably in their middle ages as well).

I have some experience in education (as a student and as a tutor), and most of the people I’ve met were undergraduate or professional CS people. It’s a totally different genre. They have no background in computer usage, probably  they have no mathematical or physical  background, they have no English knowledge. So back to the basics. It’s the biggest challenge. Explain yourself in plain English (in my case plain Hungarian), show them how to take notes and what worths to note.

Something more exciting: there is no projector to use. Students have no sight on your display. There is just yourself – and the whiteboard. You can use just your pedagogic and interpersonal skills to show them, help them, explain them everything.

As I’ve written previously I have some experience in tutoring. It’s something totally different. I have some areas I should develop:

  • show them what to note, how can they learn
  • learn how to express everything with a single pen and whiteboard
  • don’t forget to write down the keywords on the whiteboard

Actually maybe it’s not the biggest professional practice I can gain but I’m sure it’s the biggest opportunity to develop my soft end educational skill.

Friday, April 24, 2009

CTRL+ALT+TAB

Have you tried to press CTRL+ALT+TAB on Vista?

The Task Switcher appears but does not disappear when I release the buttons. It can be used as an application list and now I can easily use the mouse to hover over the icons, read the titles, select an application. It’s very convenient.

I think this feature is much more useful than the over-advertised Vista Expose (WIN+TAB) feature. Have you asked yourself how often do you use that visual effect?

Tuesday, April 21, 2009

3D Studio Max on Vista

Logo: 3D Studio Max I tried to run 3D Studio Max 9 on Vista but it just crashed. Autodesk does not support Vista in this version. There is a really simple solution:

  1. Find 3dsmax.exe in the installation directory
  2. Open Properties window (right click on the file and select Properties)
  3. Select Compatibility tab
  4. In the Compatibility mode section select Run this program in compatibility mode for checkbox
  5. Select Windows XP (Service Pack 2) in the dropdown control
  6. In the Settings section select Disable desktop composition
  7. In the Privilege level section select Run this program as an administrator
  8. Click OK

Now 3DS Max should run without any problem.