Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / WebHttpSecurity.cs / 1 / WebHttpSecurity.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System.ServiceModel.Channels; using System.Net.Security; using System.ServiceModel.Security; using System.ServiceModel.Configuration; using System.Diagnostics; using System.ServiceModel.Web; public sealed class WebHttpSecurity { internal const WebHttpSecurityMode DefaultMode = WebHttpSecurityMode.None; WebHttpSecurityMode mode; HttpTransportSecurity transportSecurity; internal WebHttpSecurity() : this(DefaultMode, new HttpTransportSecurity()) { } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", Justification = "not needed for Fx.Assert")] WebHttpSecurity(WebHttpSecurityMode mode, HttpTransportSecurity transportSecurity) { Fx.Assert(WebHttpSecurityModeHelper.IsDefined(mode), string.Format("Invalid WebHttpSecurityMode value: {0}.", mode.ToString())); this.Mode = mode; this.transportSecurity = transportSecurity == null ? new HttpTransportSecurity() : transportSecurity; } public WebHttpSecurityMode Mode { get { return this.mode; } set { if (!WebHttpSecurityModeHelper.IsDefined(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value")); } this.mode = value; } } public HttpTransportSecurity Transport { get { return this.transportSecurity; } } internal void DisableTransportAuthentication(HttpTransportBindingElement http) { this.transportSecurity.DisableTransportAuthentication(http); } internal void EnableTransportAuthentication(HttpTransportBindingElement http) { this.transportSecurity.ConfigureTransportAuthentication(http); } internal void EnableTransportSecurity(HttpsTransportBindingElement https) { this.transportSecurity.ConfigureTransportProtectionAndAuthentication(https); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UnsupportedPolicyOptionsException.cs
- EntryPointNotFoundException.cs
- XmlnsDictionary.cs
- BinaryNode.cs
- InstallerTypeAttribute.cs
- GridItemProviderWrapper.cs
- DataGridViewSelectedCellCollection.cs
- GlobalAllocSafeHandle.cs
- LexicalChunk.cs
- DashStyle.cs
- TextEditorCopyPaste.cs
- HostingEnvironmentException.cs
- Group.cs
- MsdtcWrapper.cs
- X509RecipientCertificateServiceElement.cs
- JsonReaderWriterFactory.cs
- DecimalConstantAttribute.cs
- _BasicClient.cs
- Converter.cs
- TextTrailingWordEllipsis.cs
- SetterBase.cs
- WorkflowView.cs
- AdornerLayer.cs
- DropSource.cs
- ByteConverter.cs
- Brush.cs
- TraceUtils.cs
- MouseEvent.cs
- ToolStripSeparatorRenderEventArgs.cs
- ParallelEnumerableWrapper.cs
- AutoScrollExpandMessageFilter.cs
- RootNamespaceAttribute.cs
- DataGridClipboardCellContent.cs
- Parameter.cs
- WebPartEditorApplyVerb.cs
- FastEncoderWindow.cs
- TransformerInfoCollection.cs
- EntityConnectionStringBuilderItem.cs
- TimeSpanConverter.cs
- FormsAuthenticationTicket.cs
- documentsequencetextcontainer.cs
- Line.cs
- SqlUserDefinedAggregateAttribute.cs
- Missing.cs
- DeploymentExceptionMapper.cs
- BlockUIContainer.cs
- WebBaseEventKeyComparer.cs
- SelectedDatesCollection.cs
- XpsTokenContext.cs
- XmlSchemaFacet.cs
- Error.cs
- ProgressBarHighlightConverter.cs
- PointAnimationUsingKeyFrames.cs
- ZoneButton.cs
- HeaderElement.cs
- SingleAnimation.cs
- GlyphingCache.cs
- DataGridSortingEventArgs.cs
- EdmError.cs
- DataGridTableCollection.cs
- BinaryMethodMessage.cs
- TextEditorTables.cs
- TextDecorationCollectionConverter.cs
- PointF.cs
- InternalResources.cs
- CodeDirectiveCollection.cs
- SapiGrammar.cs
- FamilyTypeface.cs
- CorrelationResolver.cs
- storepermission.cs
- HwndSourceParameters.cs
- DesignTimeParseData.cs
- MsmqBindingMonitor.cs
- XmlNamedNodeMap.cs
- BuildManager.cs
- FixedDocumentSequencePaginator.cs
- ElementFactory.cs
- EntityViewGenerationConstants.cs
- DataGridViewSelectedColumnCollection.cs
- CompModSwitches.cs
- IdentityNotMappedException.cs
- DnsEndpointIdentity.cs
- NamespaceQuery.cs
- MethodBody.cs
- XmlReflectionImporter.cs
- BlockUIContainer.cs
- StagingAreaInputItem.cs
- Base64Decoder.cs
- ToolStripItemRenderEventArgs.cs
- mansign.cs
- StylusPointPropertyInfoDefaults.cs
- SimpleExpression.cs
- MouseGestureValueSerializer.cs
- ZipIOExtraField.cs
- HwndProxyElementProvider.cs
- CustomAttributeFormatException.cs
- EntityDataSourceDataSelectionPanel.cs
- InputChannelAcceptor.cs
- smtpconnection.cs
- MethodSignatureGenerator.cs