Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

Commit e840c31

Browse files
authored
Merge pull request #46 from Azure-Samples/jmprieur/fixTLS1_2andWarnings
Update to .NET FW 4.7.2 to solve the TLS issue (with 4.2, there was a…
2 parents c9e284d + e4453e1 commit e840c31

6 files changed

Lines changed: 9 additions & 25 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
55
</startup>
6-
</configuration>
6+
</configuration>

active-directory-b2c-wpf/MainWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ private async void Window_Loaded(object sender, RoutedEventArgs e)
201201
DisplayUserInfo(authResult);
202202
UpdateSignInState(true);
203203
}
204-
catch (MsalUiRequiredException ex)
204+
catch (MsalUiRequiredException)
205205
{
206206
// Ignore, user will need to sign in interactively.
207207
ResultText.Text = "You need to sign-in first, and then Call API";

active-directory-b2c-wpf/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

active-directory-b2c-wpf/Properties/Settings.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

active-directory-b2c-wpf/TokenCacheHelper.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,13 @@
2727

2828
using System.IO;
2929
using System.Security.Cryptography;
30+
using System.Windows.Controls;
3031
using Microsoft.Identity.Client;
3132

3233
namespace active_directory_b2c_wpf
3334
{
3435
static class TokenCacheHelper
3536
{
36-
37-
/// <summary>
38-
/// Get the user token cache
39-
/// </summary>
40-
/// <returns></returns>
41-
public static TokenCache GetUserCache()
42-
{
43-
if (usertokenCache == null)
44-
{
45-
usertokenCache = new TokenCache();
46-
usertokenCache.SetBeforeAccess(BeforeAccessNotification);
47-
usertokenCache.SetAfterAccess(AfterAccessNotification);
48-
}
49-
return usertokenCache;
50-
}
51-
52-
static TokenCache usertokenCache;
53-
5437
/// <summary>
5538
/// Path to the token cache
5639
/// </summary>

active-directory-b2c-wpf/active-directory-b2c-wpf.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
<OutputType>WinExe</OutputType>
99
<RootNamespace>active_directory_b2c_wpf</RootNamespace>
1010
<AssemblyName>active_directory_b2c_wpf</AssemblyName>
11-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
11+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1414
<WarningLevel>4</WarningLevel>
1515
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
<TargetFrameworkProfile />
1617
</PropertyGroup>
1718
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1819
<PlatformTarget>AnyCPU</PlatformTarget>

0 commit comments

Comments
 (0)