ColdFusion 8 & .NET integration01 Jul 2008 | Comments
I think the current project that I'm working on is one of the most difficult and frustating projects that I've ever been into.
Spent 2 days trying to make CF8 and .NET talks to each other in different environment.
On my local machine, everything is fine. Then I move the project to development server, it didn't work, I've got this cryptic message from CF when invoking the .NET component:
System.NullReferenceException: Object reference not set to an instance of an object.
After hours of debugging, found out that it is caused by one of the inner class on the .NET cannot be instantiated (perhaps it wouldn't take me that long to figure this out if I know .NET better). So problem fixed.
When moving to staging environment, guess what, it didn't work again, different error message was thrown. It was something in the line of DotNetClassNotFoundException. Again spent hours playing with jnbridge config to no avail.
Luckily I remember the thread at CFAussie on similar issue. To debug CF8 & .NET issues, someone (Joel) suggested to look at jnbproxy.exe.config to see what .NET runtimes supported. And this was the answer to my problem, I couldn't see runtime version v2.0.50727 (.NET framework 3.5) on this config file. So I thought maybe added these lines to the config file and restarted .NET service would solved it, but alas it didn't. So further googling around this time with keyword DotNetClassNotFoundException, found that I had to re-install CF8 .NET service to get the newly added .NET framework recognized (I think it was suggested on that CFAussie thread as well). So I uninstall the .NET service and download the CF8 .NET service installer and install it again. And yes, now CF8 and .NET talking nicely to each other.