Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 77806

Re: Unable to use Datasource.cfc in Admin API - The current user is not authorized to invoke this method

$
0
0

I've found a solution to my plight - I don't know if it'll work for you or help you try something that MAY fix it.

 

I use a common code set which includes the Application.cfc from a CF Mapping - So, in the application.cfc in the actual website I do this:-

 

<cfinclude template="/UberDirectory/Application.cfc">

 

Then, in the /UberDirectory/Application.cfc, I was initialising a CFC which checks if the datasource was created for the website. The datasource checking code attempts to log into the Admin API and check & create if necessary the datasource.

 

This has previously worked without fail for me - But in this instance it failed!! I was doing two things wrong - Firstly, the CFC should only be called in the Application.cfc in the onRequestStart section as the Application had to be initialised first - This is maybe because I've invoked the application.cfc in a "non-standard" manner.

 

Secondly, once I'd moved the CFC invocation into oNRequestStart I saw the following error:-

The string COOKIE.CFAUTHORIZATION_uber-directory is not a valid ColdFusion variable name.

 

I had this as the app name .... <cfset this.name = 'uber-directory'>

 

Changedthe dash to an underscore and I was away and could once again check the datasources

 

Hope it helps

 

Martin


Viewing all articles
Browse latest Browse all 77806

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>