gkmchardy
gkmchardy

Reputation: 43

Classic ASP cannot connect to SQL database after TLS 1.0 removed from server

I have an IIS web application which connects to a SQL Server like this:

set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open("DRIVER={SQL Server};SERVER=servername;DATABASE=dbname;UID=username;PASSWORD=pwd)

Recently I started getting the following error:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error

When I asked my server admin what this meant, he said that they had recently removed TLS 1.0 from the IIS server my web application is mounted on. He made sure the new SQL ODBC 13 drivers were installed on the web server, but it did not help.

Although the web app has never had a DSN before, we created one for it using the ODBC 13 driver. When I tried connecting like this:

objConn.Open "DSNname"

I got the following error:

[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

I looked up ConnectionStrings.com to see if there were a way of specifying a different driver. I tried this:

objConn.Open("DRIVER={SQL Server Native Client 13.0};SERVER=servername;DATABASE=dbname;UID=username;PASSWORD=pwd)

And this is the error message that was produced:

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Don't know what else to do. Any ideas?

Upvotes: 3

Views: 5828

Answers (2)

Ravi Ram
Ravi Ram

Reputation: 24488

We had to update 3 servers that are running several Classic ASP websites. The main reason was we need to implement Twillio API SMS messaging wich required TLS 1.0 and TLS 1.1 to be disabled/removed.

It took several days and we had the websites go up and down through the process.

I wrote a blog post to document the process for other team members. I hope it helps. https://dhali.com/programming/tls-1-2-with-classic-asp/

Here are the outlined steps:

  1. https://www.ssllabs.com/ssltest to get the current TLS Configuration
  2. Using IISCrypto Tool we updated the Registry Files on the server
  3. Ran https://www.ssllabs.com/ssltest to prove TLS 1.0 and 1.1 removed
  4. Update ODBC to the latest ver supports TLS 1.2 [Microsoft® ODBC Driver 13.1 for SQL Server]
  5. Update the connection string to use the current ODBC SQL 13 driver

ODBC to the lastest version

Updated connection string

Upvotes: 4

David Browne - Microsoft
David Browne - Microsoft

Reputation: 89419

The specified DSN contains an architecture mismatch between the Driver and Application

You can create either a 32bit DSN or a 64bit DSN. You need to create one matching the bitness of your program. Probably 32-bit.

Upvotes: 0

Related Questions