diff options
Diffstat (limited to 'src/OAuth/OAuthClient/SampleWcf2.aspx.cs')
-rw-r--r-- | src/OAuth/OAuthClient/SampleWcf2.aspx.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/OAuth/OAuthClient/SampleWcf2.aspx.cs b/src/OAuth/OAuthClient/SampleWcf2.aspx.cs index 130932c..a94be96 100644 --- a/src/OAuth/OAuthClient/SampleWcf2.aspx.cs +++ b/src/OAuth/OAuthClient/SampleWcf2.aspx.cs @@ -87,6 +87,8 @@ this.nameLabel.Text = this.CallService(client => client.GetName()); } catch (SecurityAccessDeniedException) { this.nameLabel.Text = "Access denied!"; + } catch (MessageSecurityException) { + this.nameLabel.Text = "Access denied!"; } } @@ -96,6 +98,8 @@ this.ageLabel.Text = age.HasValue ? age.Value.ToString(CultureInfo.CurrentCulture) : "not available"; } catch (SecurityAccessDeniedException) { this.ageLabel.Text = "Access denied!"; + } catch (MessageSecurityException) { + this.ageLabel.Text = "Access denied!"; } } @@ -105,6 +109,8 @@ this.favoriteSitesLabel.Text = string.Join(", ", favoriteSites); } catch (SecurityAccessDeniedException) { this.favoriteSitesLabel.Text = "Access denied!"; + } catch (MessageSecurityException) { + this.favoriteSitesLabel.Text = "Access denied!"; } } |