Unable To Instantiate TRIM Database: 80040154
I recently came across this error while attempting to connect to TRIM 6 R2 via the TRIMSDK: Retrieving the COM class factory for component with CLSID {8A354548-6BCB-11D3-B273-00A0C9FC3DC0} failed due to the following error: 80040154.
This was a little alarming because it was using the same data adapter as a few other TRIM projects, which were working fine; the only difference between the project was that this particular project was a WPF application, and all of the other applications were ASP.NET applications. This particular application had also previously worked fine, the only change was that I had been upgraded to a 64-bit environment.
After a bit of playing around and research I discovered the TRIM SDK will not connect under a 64-bit process.
Workaround:
- In Visual Studio, right-click your project and go to Properties (last item).
- Select the Build tab.
- Change the Configuration option to All Configurations.
- Change the Platform Target to x86.
This will ensure that your application will only run under an x86 architecture, and will be able to connect to TRIM even on a 64-bit host.
Looking at the QuickSpecs for TRIM 7 it is being based on a 64-bit architecture and therefore this issue should be eliminated come TRIM 7 (in addition to some SDK enhancements and UI integration tools).
FIX: Access is Denied 0×80070005
Recently I came across the problem where i was occasionally receiving an ‘Access is Denied 0×80070005′ error in the test environment for an ASP.NET application I was developing. After narrowing it down I discovered the error was only ever occurring when a call to the database was being made within the bounds of a TransactionScope(). After a quick search I discovered a thread on the asp.net forums where someone else was having this issue as the MSDTC was not configured correctly.
Applying the same information from the aforementioned thread I soon discovered that the test vs development environments were showing similar results to that mentioned in the thread. In the end the following solution resolved the problem.
Use sc sdshow msdtc on the server to display the current configuration, which should be similar to:
D:(A;;CCLCSWRPLOCRRC;;;S-1–2-0)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CR;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)(A;;CCLCSWRPLORC;;;NS)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
Using sc sdset msdtc change the section in red to read as (A;;CCLCSWRPRC;;;WD) e.g:
D:(A;;CCLCSWRPLOCRRC;;;S-1–2-0)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)(A;;CCLCSWRPRC;;;WD)(A;;CCLCSWRPLORC;;;NS)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
ScrewTurn Syntax Highlighter Plugin
ScrewTurn is an open source wiki engine written in C# .NET 2.0. While it does have many useful features, it is lacking one of the features I find most useful… A syntax highlighter. However, it does have a fairly good plugin system which lets you extend the wiki beyond its standard features. After searching through the forums the only syntax highlighter I could find was one by t_magennis (GeShi Code Highlighting), which uses the PHP GeSHi library, and since ScrewTurn is an ASP.NET application it makes this plugin more of a hack.
After searching around I found a lightweight syntax highlighter by Thomas Johansen and Christian Nordbakk, called Lonwans Highlighter. Although it is not as extensively written as GeSHi, it does perform highlighting and supports 23 languages with the ability to extend the amount of languages through an XML file. This is the basis for the plugin which I created… Syntax Highlighter.
For more information, download and installation instructions, please see the plugin’s software page.



