Skip to main content
ksaravn
Participant
December 18, 2016
Answered

CF2016, IIS 8.5 and REST Services not working

  • December 18, 2016
  • 2 replies
  • 2030 views

Hi,

I'm not able get my REST service to work... I get a 404 when I call the URL.

I'm running Win 2012 R2, CF2016 Enterprise, IIS 8.5 webserver.

Directory looks like this

C:\ColdFusion2016\cfusion\wwwroot\test

CODE - "hello.cfc"

component rest="true" restpath="/helloTest"{ remote string function sayHello() httpMethod="get" { return "Hello World"; } }

The coldfusion ADMIN setup looks like this

Root path: 'C:\ColdFusion2016\cfusion\wwwroot\test' Service Mapping: 'test'

I get a green 'success' message when I set that path

Browse to -

http://127.0.0.1/rest/test/helloTest


result - 404

What am I doing wrong? I have tried the same without IIS but no luck. Can any one give me suggestion on this issue?

Thanks in Advance.

This topic has been closed for replies.
Correct answer Zaziele

Okay. On to additional potential issues then.

First of all, your last reply is showing localhost:8500 in your URL. In my experience ColdFusion 2016 configured the Administrator to be accessed via port 8500, but IIS is most likely still listening on port 80. I would recommend dropping the port out and using http://localhost/rest/test/helloTest

If you are still receiving the issue there could be any number of configuration issues that could be causing you issues, such as:

  • By using localhost or 127.0.0.1 you will be using the Default Web Site in IIS. Ensure that the Default Web Site is running and that CF 2016 is configured to handle traffic for that site. (It most likely is since you can access the CF Admin, but since you can choose to change how you access the CF Admin, I felt it prudent to cover this point.)
  • If your server had a previous version of ColdFusion installed on it, ensure that the handlers in IIS are passing the traffic to CF 2016, not the old installation.
  • If your server was freshly set up, did you install ColdFusion before enabling IIS on the server? I am not 100% if this is possible, but if it is there is a chance that CF 2016 was not able to bind itself to any sites during installation and is thus not handling your rest request.

I hope something there helps!

2 replies

Inspiring
January 5, 2017

Good afternoon, Saravn.

I have tried to recreate your issue but have not been successful. Before I start throwing out various general "could-be" scenarios, what patch level of ColdFusion 2016 are you running? I have just recently set up our CF 2016 box which came with CF 2016 Update 3.

If you are not sure where to find the update level you're on, go to your ColdFusion Admin -> Server Update in the left navigation, and then the "Installed Updates" tab on that page.

ksaravn
ksaravnAuthor
Participant
January 5, 2017

Hi Zaziele, Thanks for your reply

I'm also using the latest updated version

ColdFusion 2016 Update 3 is embedded in the full installer. It includes support for Windows 10 Version 1607

localhost:8500/rest/test/helloTest is returning 404 error,

ZazieleCorrect answer
Inspiring
January 5, 2017

Okay. On to additional potential issues then.

First of all, your last reply is showing localhost:8500 in your URL. In my experience ColdFusion 2016 configured the Administrator to be accessed via port 8500, but IIS is most likely still listening on port 80. I would recommend dropping the port out and using http://localhost/rest/test/helloTest

If you are still receiving the issue there could be any number of configuration issues that could be causing you issues, such as:

  • By using localhost or 127.0.0.1 you will be using the Default Web Site in IIS. Ensure that the Default Web Site is running and that CF 2016 is configured to handle traffic for that site. (It most likely is since you can access the CF Admin, but since you can choose to change how you access the CF Admin, I felt it prudent to cover this point.)
  • If your server had a previous version of ColdFusion installed on it, ensure that the handlers in IIS are passing the traffic to CF 2016, not the old installation.
  • If your server was freshly set up, did you install ColdFusion before enabling IIS on the server? I am not 100% if this is possible, but if it is there is a chance that CF 2016 was not able to bind itself to any sites during installation and is thus not handling your rest request.

I hope something there helps!

Carl Von Stetten
Legend
December 21, 2016

What happens if you try http://127.0.0.1/rest/helloTest ?

ksaravn
ksaravnAuthor
Participant
January 4, 2017

Hi,

I'm getting below response form CF builtin server and IIS.

<REST><MESSAGE>Not Found</MESSAGE><STATUS>404</STATUS></REST>