?
Solved

ColdFusion CFHTTP Web Service - 401 Authentication Error

Posted on 2011-02-15
14
Medium Priority
?
2,708 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
ID: 34903437
0
 
LVL 11

Accepted Solution

by:
Brijesh Chauhan earned 2000 total points
ID: 34903927
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
ID: 34903957
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:dwerden
ID: 34905822
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
ID: 34906283
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
ID: 34906320
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
ID: 34906417
You are using IIS version 7.5 ...
0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
ID: 34906427
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
ID: 34906433
   * 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
ID: 34906454
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
ID: 34906596
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
ID: 34906729
okay.. so you are running IIS 7.5. ....
0
 

Author Comment

by:dwerden
ID: 34909722
...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
ID: 34915444
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

Cyber Threats to Small Businesses (Part 2)

The evolving cybersecurity landscape presents SMBs with a host of new threats to their clients, their data, and their bottom line. In part 2 of this blog series, learn three quick processes Webroot’s CISO, Gary Hayslip, recommends to help small businesses beat modern threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
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…
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 lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month16 days, 20 hours left to enroll

864 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