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.
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:
Copy link to clipboard
Copied
What happens if you try http://127.0.0.1/rest/helloTest ?
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>
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.
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,
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:
I hope something there helps!
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.
Copy link to clipboard
Copied
Glad to hear it, Saravn! You're quite welcome - happy coding!
Copy link to clipboard
Copied
Zaziele, you can still browse to ColdFusion on port 8500 if you have iis installed...