Link to home
Start Free TrialLog in
Avatar of dwerden
dwerden

asked on

ColdFusion CFHTTP Web Service - 401 Authentication Error

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?
Avatar of shalabhsharma
shalabhsharma
Flag of India image

ASKER CERTIFIED SOLUTION
Avatar of Brijesh Chauhan
Brijesh Chauhan
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dwerden
dwerden

ASKER

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.
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...
Avatar of dwerden

ASKER

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?
You are using IIS version 7.5 ...
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
   * 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
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
Avatar of dwerden

ASKER

There is no version tab, but under Details it looks like 7.5 to me. I am attaching a screen shot. User generated image
okay.. so you are running IIS 7.5. ....
Avatar of dwerden

ASKER

...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!
Avatar of dwerden

ASKER

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.