Tuesday, February 07, 2012

ColdFusion dotNet integration issues

After installing ColdFusion 8.1 on a new server, I was getting errors related to ColdFusion dotNet integration on pages that called .Net dlls.

It turned out that the server only had .net 4.- framework installed whereas the dll was using .net framework 2.0. So I installed the .net framework and restarted the ColdFusion .Net integration service. But this still did not resolve the issue.

I had to uninstall the "ColdFusion .Net integration service" and then re-install it. This resolved the issue with one of the dll's. So it looks like when  the "ColdFusion .Net integration service" is installed, it somehow only knows about the existence of the existing .net frameworks. Any new frameworks that are installed are not "picked up" automatically. So apparently you have to install the .net frameworks before installing the ColdFusion .Net Integration service.

Now after doing this I was still getting an error with a different dll. The error was:
"DotNetExtension not installed. - DotNetExtension not installed. If a dll is specified in the assembly list, DotNetExtension must also be installed.
It was surprising that one dll would work and another would not. So I looked at the differences between the two dlls, I found that the dll that was not working was calling an external web service over port 80.


When I had re-installed the ColdFusion .Net integration service, I had installed it in a directory outside of the main CF install directory. So if ColdFusion was installed in: c:/coldfusion/ the .Net integration service was installed in c:/CFdotNetService/. Also, ColdFusion was running under a domain account and the .Net Integration Service was running under a local account.
So to me it looked like it could be some sort of permissions issue. And sure, when I gave the domain account (under which CF was running) permissions to the c:/CFdotNetService/ directory, the dll started working.