Skip to main content
Inspiring
July 9, 2007
Answered

"Windows Authentication Mode" when SQL Server 200 and CF on different machines?

  • July 9, 2007
  • 2 replies
  • 1800 views
Hi All,

I am playing for two days with following problem. And still I did not able to get rid of it.

I have installed SQL Server 2000 on machine which is my server (windows 2003 server) and this machine is my domain controller. I have user “ABC” user and I have added this user in administrator group.

I have another machine where OS is Windows XP and CF 7 is installed. I create an ODBC Connection from Administrative Tool to my Database (windows 2003 server) successfully.

Now when I create Data Socket in Coldfusion Administrator and when I select the my ODBC that I had created and when I Submit it then CF admin throughs the following message.

Connection verification failed for data source: myTest
java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

Please Brother, I don’t have any Clue to solve it, Please help.

One Important thing, All this working fine if my CF, and SQL Server are on same machine.

Best regards,
Shahid
This topic has been closed for replies.
Correct answer pak-Nash
The key to understanding this problem is finding out why the anonymous account is being passed as the login account. What account is assigned to the DSN?
Hi Phil Thanks,

Finally i able to configure it out..... following are the steps...

I assume domain controller is properly configure.

Following are the steps for the machine where SQL SERVER 2000 is installed

1- We need to create Login account for your domain account in SQL Server 2000 using Enterprise Manager.
• Right Click -> New Login
• Click to load the domain users, select any user from your domain that will connect to your SQL Server from LAN.

Following are the steps for the machine where ColdFusion and IIS are installed.

Step No. 1

Stop ColdFusion MX.

Backup your existing macromedia_drivers.jar file.

Unzip macromedia_drivers.zip into the same directory, overwriting the previous
macromedia_drivers.jar.

You can download “macromedia_drivers.zip” from following URL

http://kb.adobe.com/support/coldfusion/ts/documents/1a3c2ad0/macromedia_drivers.zip

A new file, DDJDBCAuth03.dll, which is required for Windows Authentication, is also included in the zip file replacing the older DDJDBCAuth.DLL.

Restart ColdFusion MX.

ColdFusion MX loads the JDBC drivers inmacromedia_drivers.jar in the directory cf_root/lib. For example, with ColdFusion MX 7 Server Configuration on Windows installed on drive C:, this would beC:\CFusionMX7\lib\macromedia_drivers.jar.

Then restart Machine
Step No. 2

Configure all the ColdFusion Services to “Log On As” using the Domain User Account configured in SQL Server in the above mentioned step.

Change the “Log On As” similar for the all other Cold fusion services (ColdFusion MX 7 ODBC Agent, ColdFusion MX 7 ODBC Server, ColdFusion MX 7 Search Server).

Step No. 3
Restart the services; for the safe side reboot the system.


Step No. 4

Create ODBC (Control Panel -> Administrative Tool -> Data Sources (ODBC)) using the windows NT Authentication option to connect to database.

Step No. 5
Create Data Socket and Select the created ODBC connection in the Drop down (ColdFusion-> Admin)


Thanks to all who participated in this discussion...

With lots of Thanks to All particular to Phil who guided me in right direction,
Shahid

2 replies

pak-NashAuthor
Inspiring
July 10, 2007
Hi All,

Is there any other simple way to use the sql server in windows authentication mode from coldfusion???

Please share if you have the knowledge.

Thanks
Shahid
July 10, 2007
Yes, the simple way is the correct way and that is not to use ODBC. Use the latest Macromedia JDBC Drivers. Follow the directions on how to setup NT authentication with MS SQL server as outlined in that technote. ODBC from CFMX (any flavor) is a poor choice. JDBC is the way to go.

Also, the new Microsoft MSSQL JDBC driver could be used. Find it here and check out the integratedSecurity property to use ntauth.
pak-NashAuthorCorrect answer
Inspiring
July 16, 2007
The key to understanding this problem is finding out why the anonymous account is being passed as the login account. What account is assigned to the DSN?
Hi Phil Thanks,

Finally i able to configure it out..... following are the steps...

I assume domain controller is properly configure.

Following are the steps for the machine where SQL SERVER 2000 is installed

1- We need to create Login account for your domain account in SQL Server 2000 using Enterprise Manager.
• Right Click -> New Login
• Click to load the domain users, select any user from your domain that will connect to your SQL Server from LAN.

Following are the steps for the machine where ColdFusion and IIS are installed.

Step No. 1

Stop ColdFusion MX.

Backup your existing macromedia_drivers.jar file.

Unzip macromedia_drivers.zip into the same directory, overwriting the previous
macromedia_drivers.jar.

You can download “macromedia_drivers.zip” from following URL

http://kb.adobe.com/support/coldfusion/ts/documents/1a3c2ad0/macromedia_drivers.zip

A new file, DDJDBCAuth03.dll, which is required for Windows Authentication, is also included in the zip file replacing the older DDJDBCAuth.DLL.

Restart ColdFusion MX.

ColdFusion MX loads the JDBC drivers inmacromedia_drivers.jar in the directory cf_root/lib. For example, with ColdFusion MX 7 Server Configuration on Windows installed on drive C:, this would beC:\CFusionMX7\lib\macromedia_drivers.jar.

Then restart Machine
Step No. 2

Configure all the ColdFusion Services to “Log On As” using the Domain User Account configured in SQL Server in the above mentioned step.

Change the “Log On As” similar for the all other Cold fusion services (ColdFusion MX 7 ODBC Agent, ColdFusion MX 7 ODBC Server, ColdFusion MX 7 Search Server).

Step No. 3
Restart the services; for the safe side reboot the system.


Step No. 4

Create ODBC (Control Panel -> Administrative Tool -> Data Sources (ODBC)) using the windows NT Authentication option to connect to database.

Step No. 5
Create Data Socket and Select the created ODBC connection in the Drop down (ColdFusion-> Admin)


Thanks to all who participated in this discussion...

With lots of Thanks to All particular to Phil who guided me in right direction,
Shahid

Inspiring
July 9, 2007
If your CF service is running in the context of the local system account, you need to change it to a network account that has rights to the SQL box.

pak-NashAuthor
Inspiring
July 10, 2007
Hi Phil ,

First of all thank you very much for giving me the direction.

Phil, I have a user in my domain with name "ABC" on my server.
I created the "ABC" on my machine and i add this in "Administrator Group". I changed the "ColdFusion MX 7 Application Server" the account from the Log On tab and I gave the "ABC" in account.

But now when I logged in through "ABC" user(domain account) on my machine. I am not able to browse my coldfusion admin.

Phil, I don't know why this is happening.

Once again thanks for your reply. I will be waiting for your response. I tried alot to some how fix this but no success.

Thanks,
Shahid