• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Unable to create an object of an assembly.

New Here ,
Dec 13, 2016 Dec 13, 2016

Copy link to clipboard

Copied

Hello all,

I am very new to ColdFusion and am trying to create an instance of an assembly. Here is the two different paths I have tried so far:

*Note* Calculator is the name of the assembly/namespace and Calc is the class inside of the assembly.

<cfobject type="dotnet" name="calcInstance" class="Calculator.Calc" assembly="C:\ColdFusion2016\cfusion\wwwroot\WEB-INF\cfclasses\dotNetProxy\Calculator.dll">

and

<cfscript>

  calculatorInstance = CreateObject(".NET", "Calculator.Calc", "C:\ColdFusion2016\cfusion\wwwroot\WEB-INF\cfclasses\dotNetProxy\Calculator.dll");

  myVar = calculatorInstance.addition(1, 1);

</cfscript>

Both return "The error occurred in C:/inetpub/wwwroot/Test/index.cfm: line"

There's no specific error that is given, just tells me that there was an error. I have JNBDotNetSide.exe running. I'm really not sure what I'm doing wrong.

Does anyone have any suggestions on what to do?

Views

228

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation