Solved

ColdFusion CFHTTP Web Service - 401 Authentication Error

Posted on 2011-02-15
14
2,492 Views
Last Modified: 2012-05-11
We have a server that is running Microsoft Dynamics, which offers some web services. I am trying to use CF9 on a different server to send a request to a web service on the Dynamics box. I can view the WSDL in my browser using my login credentials. I can also test it using a desktop app called SOAP Sonar. That tool has a way to specify authentication before making the web service call.

However, when I try to use CF, by building the XML we will send and using cfhttp, I get an IIS 401 authentication error. I have the username and password in the cfhttp tag.

Thinking it might be the server with CF that is having trouble with authentication, I ran my local instance of CF9 and tried the same code. Same error.

What could cause a cfhttp tag to not properly pass the authentication information? Or is there somewhere else I should be looking?
0
Comment
Question by:dwerden
  • 8
  • 5
14 Comments
 
LVL 9

Expert Comment

by:shalabhsharma
Comment Utility
0
 
LVL 11

Accepted Solution

by:
Brijesh Chauhan earned 500 total points
Comment Utility
The password attribute of CFHTTP does not provide support for Integrated Windows, NTLM, or Kerebos authentication.

From CFDOCS

password

Optional
      
Use to pass a password to the target URL for Basic Authentication. Combined with username to form a base64 encoded string that is passed in the Authenticate header. Does not provide support for Integrated Windows, NTLM, or Kerebos authentication.
0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
Comment Utility
0
 

Author Comment

by:dwerden
Comment Utility
The web services server I am trying to use is running Windows 2008 r2, so I think we are not using IIS6 (the topic of the first response above).

I'm checking to see what type of authentication is being used and will post back here as soon as I find out. Thanks.
0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
Comment Utility
You have mentioned that I get an IIS 401 authentication error. I have the username and password in the cfhttp tag.,

so just wanted to clarify that the username / password support in CFHTTP tag is for BASIC AUTHENTICATION..

IIS is the web-server, you would be using a web-server, windows 2008 r2 is your operating system...
0
 

Author Comment

by:dwerden
Comment Utility
Right, I probably didnt use correct terms. My understanding is that the version of Windows more-or-less controls the version of IIS. Looking at the IIS screens on this server, and going to the Help/about menu, I see that it says Version 6.1 (build 7600) at the top, but lower down on that screen it says Internet Information Services (Version 7.5.7600.16385).

Does that mean I am using IIS 6 or IIS 7.5?
0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
Comment Utility
You are using IIS version 7.5 ...
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 11

Expert Comment

by:Brijesh Chauhan
Comment Utility
Yes, you are right, the version of windows controlls the version of IIS

IIS 1.0 Windows NT Server 3.51
IIS 2.0 Windows NT Server 4.0
IIS 3.0 Windows NT Server 4.0 SP3
IIS 4.0 Windows NT Server 4.0 SP3 + Option Pack
IIS 5.0 Windows 2000
IIS 5.1 Windows XP
IIS 6.0 Windows Server 2003
0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
Comment Utility
   * IIS 1.0, Windows NT 3.51 available as a free add-on
    * IIS 2.0, Windows NT 4.0
    * IIS 3.0, Windows NT 4.0 Service Pack 3
    * IIS 4.0, Windows NT 4.0 Option Pack
    * IIS 5.0, Windows 2000
    * IIS 5.1, Windows XP Professional and Windows XP Media Center Edition (requires retail CD)
    * IIS 6.0, Windows Server 2003 and Windows XP Professional x64 Edition
    * IIS 7.0, Windows Server 2008 and Windows Vista (Home Premium, Business, Enterprise and Ultimate editions)
    * IIS 7.5, Windows Server 2008 R2 and Windows 7
0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
Comment Utility
You can go to C:\WINDOWS\system32\inetsrv and right click on inetinfo.exe -> then properties -> version, You should be running IIS 6, sorry about the comment 34906417
0
 

Author Comment

by:dwerden
Comment Utility
There is no version tab, but under Details it looks like 7.5 to me. I am attaching a screen shot. Properties of Inetinfo.exe
0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
Comment Utility
okay.. so you are running IIS 7.5. ....
0
 

Author Comment

by:dwerden
Comment Utility
...I'm still trying to find out if Windows Basic authentication is enabled and set up for the resource I need on the server. There were too many people involved in setting it up, so It's hard to track this down!
0
 

Author Closing Comment

by:dwerden
Comment Utility
Our problem is mute, because the web services vendor has found a better solution (using SQL directly). However, brijeshchauhan pointed to exactly what the cause seems to be and was helpful and responsive.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now