Solved

ColdFusion CFHTTP Web Service - 401 Authentication Error

Posted on 2011-02-15
14
2,582 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
14 Comments
 
LVL 9

Expert Comment

by:shalabhsharma
ID: 34903437
0
 
LVL 11

Accepted Solution

by:
Brijesh Chauhan earned 500 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
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…

742 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