We use web2p 2.18.5 with MS SQL on Windows IIS 10. Recently a security patch on the server enforced stricter SSL rules and we can no longer use TLS 1.0 and 1.1. so it has to be TLS 1.2

90 views
Skip to first unread message

Davidiam

unread,
Jun 19, 2020, 1:44:53 AM6/19/20
to web2py-users
Good Morning,

I would like to know what I would have to modify in order to connect to MS SQL from web2py with TLS 1.2.  We are running web2py 2.18.5 on a Windows 2016 IIS server.

Yesterday a security patch was installed to disable TLS 1.0 and 1.1 and enable TLS 1.2 and now all our MS SQL DB connections are failing.

Thank you very much for your help on this, I would appreciate a rapid reply as our development in web2py is now blocked due to this.

Kind Regards,
David

Nico Zanferrari

unread,
Jun 19, 2020, 3:35:30 AM6/19/20
to web...@googlegroups.com
Hi David,

if I understand right you are not anymore able to connect to an external MS SQL database from a Windows server. This does not seem a web2py issue ;-)

Anyhow, have you checked that your web2py server and your  external MS SQL database are compatible with TLS 1.2? Have you verified it? See here for details. 

Nico


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/e03e78e7-24fd-494c-ab66-47f899260c82o%40googlegroups.com.

Davidiam

unread,
Jun 19, 2020, 4:04:56 AM6/19/20
to web2py-users
The reason that I put it here is that that web2py pydal uses the pyodbc driver and I thought that there may be version requirements or connection parameters that would resolve this.
I will now also look at the link that you sent.

On Friday, June 19, 2020 at 9:35:30 AM UTC+2, Nico Zanferrari wrote:
Hi David,

if I understand right you are not anymore able to connect to an external MS SQL database from a Windows server. This does not seem a web2py issue ;-)

Anyhow, have you checked that your web2py server and your  external MS SQL database are compatible with TLS 1.2? Have you verified it? See here for details. 

Nico


Il giorno ven 19 giu 2020 alle ore 07:45 Davidiam <david....@gmail.com> ha scritto:
Good Morning,

I would like to know what I would have to modify in order to connect to MS SQL from web2py with TLS 1.2.  We are running web2py 2.18.5 on a Windows 2016 IIS server.

Yesterday a security patch was installed to disable TLS 1.0 and 1.1 and enable TLS 1.2 and now all our MS SQL DB connections are failing.

Thank you very much for your help on this, I would appreciate a rapid reply as our development in web2py is now blocked due to this.

Kind Regards,
David

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web...@googlegroups.com.

Dave S

unread,
Jun 19, 2020, 10:16:33 PM6/19/20
to web2py-users
I don't think I can help you; I'm not on either IIS or MSSQL.  One of our long-time experts and contributors   Niphlod's (er, Stephane) was involved with IIS environments, so web2py has been well wrung out on IIS, but he's been busy elsewhere lately.

BTW, please don't be confused by Google Groups form having a check-box for "show on top".  In this group, that is used primariy for major announcements, usually by Massimo, such as the "New py4web group" post.  Since GG defaults to showing posts in order of recent activity, new posts are near the top anyway.

/dps

Davidiam

unread,
Jun 22, 2020, 5:07:32 AM6/22/20
to web2py-users
Sorry, I thought the post on top was only for me, I didn't know it was for everyone :S

Davidiam

unread,
Jun 22, 2020, 5:10:35 AM6/22/20
to web...@googlegroups.com
UPDATE : I managed to find the solution so I will post it here for any others that have the same issue :

We had to install a new ODBC driver and to modify the MS SQL connection string.

Old string :

uri       = mssql://DRIVER={SQL Server}

 

New string :

uri       = mssql://DRIVER={ODBC Driver 13 for SQL Server}

 

We then ran into problems with web2py trying to recreate the auth tables which already existed.  

gluon.contrib.pypyodbc.ProgrammingError: ('42S01', "[42S01] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]There is already an object named 'auth_user' in the database.")

 

To resolve this, we then needed to add "fake_migrate=True" to our DAL connect string.  After doing this we no longer got an error and everything worked correctly.  We then removed the fake_migrate parameter and it continued working correctly.


Dave S

unread,
Jun 22, 2020, 3:22:48 PM6/22/20
to web2py-users


On Monday, June 22, 2020 at 2:10:35 AM UTC-7, Davidiam wrote:
UPDATE : I managed to find the solution so I will post it here for any others that have the same issue :

We had to install a new ODBC driver and to modify the MS SQL connection string.



Thank you, followups are good for the record!

Glad to hear you got it sorted.

/dps

Dave S

unread,
Jun 22, 2020, 3:24:04 PM6/22/20
to web2py-users


On Monday, June 22, 2020 at 2:07:32 AM UTC-7, Davidiam wrote:
Sorry, I thought the post on top was only for me, I didn't know it was for everyone :S

I think the GG form is unclear, and I wouldn't mind if they came up with a different wording, or moved that option to the hamburger menu.

/dps
Reply all
Reply to author
Forward
0 new messages