February 28, 2024
CF2023 OFFLINE ACTIVATION
Comments
(0)
February 28, 2024
CF2023 OFFLINE ACTIVATION
Staff 6 posts
Followers: 0 people
(0)

The below steps would be used for CF2023 server, when the server is Offline/Private network or connected via proxy settings in place (without direct internet access)

In ColdFusion, there are Admin APIs available through which developers can add, modify, and delete Admin task programmatically. This is helpful for developers who do not have access to ColdFusion Administrator, for example, component event gateway, data sources, mail, and so on.

To access the components, use the below link, RDS needs to be enabled.

    http://{ip address}:<port>/CFIDE/adminapi/

  • Create a file name as generate_request_file.cfm under cfusion\wwwroot directory and use the below sample snippet:

<cfscript>

adminObj = createObject(“component”,”cfide.adminapi.administrator”)

adminObj.login(“password”);  //CF admin password.

//previousSN=”previous serial number”

currentSN=” xxxx – xxxx – xxxx – xxxx – xxxx – xxxx”

// instantiate the license object

myObj = createObject(“component”,”CFIDE.adminapi.license”)

// generare offline activation request

try{

myObj.generateOfflineActivationRequest(currentSN)

}

catch(any e){

writeDump(e)

}

</cfscript>

The “password” value above is the CF admin credentials for login.

The entire “xxxx” value including the hiphens would the serial number being used for the server.

By default, the request code file would be generated under cfusionbin.config folder. (Example: F82F19D2-72E4-47F5-8D4E-9ED964DBB720-request.json)

  • Once you’ve generated the request file in point 1, navigate to https://www.adobe.com/go/coldfusion-activate from a computer with active internet connection, and upload the activation request file.
  • On the same page, download the activation response file.

  • Move the file downloaded (named ResponseCode.json) to the host machine where CF is installed and place under cfusion/bin/.config directory.
  • Create a file name as Activate_Offline.cfm under cfusion\wwwroot directory and use the below sample snippet:

<cfscript>

    // Login is always required.

    adminObj = createObject(“component”,”cfide.adminapi.administrator”)

    adminObj.login(“password”);  //CF admin password.

    //previousSN=”previous serial number”

    currentSN=” xxxx – xxxx – xxxx – xxxx – xxxx – xxxx”

    filePath=”/opt/ColdFusion2023/cfusion/bin/.config/ResponseCode.json”

    // instantiate the license object

    myObj=CreateObject(“component”,”CFIDE.adminapi.license”)

    // Activate CF offline

    myObj.activateOffline(currentSN,filePath)

</cfscript>

The “password” value above is the CF admin credentials for login.

The entire “xxxx” value with the hyphens included would the serial number being used for the server.

The filePath – would be the location the request code is generated. For Windows example:

C:\ColdFusion2023\cfusion\bin\.config\ResponseCode.json

  • Once step 5 is run, you would observer a “cfLicense.json” file generated under cfusion\bin\.config directory.
  • Restart the CF services and CF would be activated.
0 Comments
Add Comment