Highlighted

CF2016, IIS 8.5 and REST Services not working

Community Beginner ,
Dec 18, 2016

Copy link to clipboard

Copied

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.

Correct answer by Zaziele | Community Beginner

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!

Views

1.3K

Likes

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

CF2016, IIS 8.5 and REST Services not working

Community Beginner ,
Dec 18, 2016

Copy link to clipboard

Copied

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.

Correct answer by Zaziele | Community Beginner

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!

Views

1.3K

Likes

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
Dec 18, 2016 0
Most Valuable Participant ,
Dec 21, 2016

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Dec 21, 2016 0
Community Beginner ,
Jan 04, 2017

Copy link to clipboard

Copied

Hi,

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

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

Likes

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
Reply
Loading...
Jan 04, 2017 0
Community Beginner ,
Jan 05, 2017

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Jan 05, 2017 0
Community Beginner ,
Jan 05, 2017

Copy link to clipboard

Copied

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,

Likes

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
Reply
Loading...
Jan 05, 2017 1
Community Beginner ,
Jan 05, 2017

Copy link to clipboard

Copied

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!

Likes

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
Reply
Loading...
Jan 05, 2017 0
Community Beginner ,
Jan 10, 2017

Copy link to clipboard

Copied

Zaziele,

Thanks for your reply.

The issue was because I enabled IIS after installing CF2016.

Once again. Thanks for your time @Zaziele.

Likes

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
Reply
Loading...
Jan 10, 2017 1
Community Beginner ,
Jan 11, 2017

Copy link to clipboard

Copied

Glad to hear it, Saravn! You're quite welcome - happy coding!

Likes

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
Reply
Loading...
Jan 11, 2017 1
Community Beginner ,
Nov 04, 2017

Copy link to clipboard

Copied

Zaziele, you can still browse to ColdFusion on port 8500 if you have iis installed...

Likes

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
Reply
Loading...
Nov 04, 2017 0