Adoxio / xRM-Portals-Community-Edition

The definitive edition of Microsoft Open Source Portals, supported by the experts in portals.
MIT License
107 stars 60 forks source link

Update all projects to target .NET Framework 4.7 for TLS 1.2 compatibility #32

Closed amervitz closed 6 years ago

amervitz commented 7 years ago

.NET Framework versions below 4.6 don't use TLS 1.2 by default. Older versions of the TLS protocol (1.0/1.1) are subject to being disabled for security reasons, and we need to ensure compatibility with hosting providers that either don't support the older protocols now or won't be supporting them in the future.

Upgrade all the projects to target the newest .NET Framework available, which is currently .NET 4.7, to enable the default usage of TLS 1.2 when connecting to Dynamics 365.

The system requirements will change compared to the originally documented requirements provided by Microsoft, and this .NET Framework version requirement will need to be included in setup instructions.

amervitz commented 7 years ago

The changes has been committed to my dotnet47 branch for testing purposes. I'll merge it to master in a few days if no glaring issues are found.

amervitz commented 7 years ago

Status update for those following this issue. This effort has hit some complications so it'll still be a while longer before the upgrade is completed. I’m currently troubleshooting an issue where the routing of some requests appears to have been affected by the upgrade, and is causing the affected requests to be served with the wrong locale. What seems to be happening is the threads of the affected requests aren’t executing code that normally sets the thread’s culture to the language of the website being viewed. The end result of this is for example the localized JavaScript bundle file at the bottom of the Default.master page is getting the wrong locale language code applied to its filename and causes the file download to fail with a 404 error.

amervitz commented 7 years ago

I've updated my branch with a change that fixes the issue I mentioned previously, by setting the thread culture in Global.asax.cs to handle changes that occurred in .NET 4.6. This will undergo more testing to see if any other problems are found.

amervitz commented 6 years ago

Closed by commit https://github.com/Adoxio/xRM-Portals-Community-Edition/commit/bb51097a3985203d648dd1d9227264bbf1f27083.