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
- CompModSwitches.cs
- NativeMethods.cs
- MultipleViewPattern.cs
- WebPartConnectionsConnectVerb.cs
- ThreadExceptionDialog.cs
- DataTablePropertyDescriptor.cs
- Control.cs
- TextBoxRenderer.cs
- NonVisualControlAttribute.cs
- ByteStorage.cs
- SQLBinary.cs
- ContentType.cs
- ParseNumbers.cs
- IsolatedStorage.cs
- DocumentGrid.cs
- Deserializer.cs
- TreeNodeEventArgs.cs
- DocumentStream.cs
- CodeValidator.cs
- SafeHandle.cs
- AutoResetEvent.cs
- URLString.cs
- Compiler.cs
- InvalidProgramException.cs
- PageStatePersister.cs
- FormatConvertedBitmap.cs
- PropertyEntry.cs
- XmlDataProvider.cs
- SQLBytesStorage.cs
- PenLineJoinValidation.cs
- LinkClickEvent.cs
- DatePickerTextBox.cs
- Pair.cs
- XPathEmptyIterator.cs
- DescendantOverDescendantQuery.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- SiteMapProvider.cs
- BuilderInfo.cs
- ControlPersister.cs
- AttributeConverter.cs
- CorrelationManager.cs
- BindingList.cs
- Intellisense.cs
- DebugHandleTracker.cs
- EndpointConfigContainer.cs
- PointIndependentAnimationStorage.cs
- UnitySerializationHolder.cs
- UInt16Storage.cs
- CodeComment.cs
- HtmlButton.cs
- VisualTreeUtils.cs
- FontConverter.cs
- ListViewItemSelectionChangedEvent.cs
- SqlTrackingWorkflowInstance.cs
- RsaSecurityToken.cs
- BrowserCapabilitiesFactory.cs
- TextureBrush.cs
- ImpersonationContext.cs
- IntermediatePolicyValidator.cs
- TPLETWProvider.cs
- DataGridTextBox.cs
- SiteMap.cs
- RawMouseInputReport.cs
- FileCodeGroup.cs
- XPathBinder.cs
- FastPropertyAccessor.cs
- CodeTypeReferenceCollection.cs
- ExeContext.cs
- CellRelation.cs
- NativeActivityMetadata.cs
- AdornerHitTestResult.cs
- UdpReplyToBehavior.cs
- SettingsPropertyNotFoundException.cs
- XmlEntity.cs
- CacheOutputQuery.cs
- AttributeCollection.cs
- JumpPath.cs
- ImageListImage.cs
- DataRow.cs
- HostedElements.cs
- XmlArrayItemAttributes.cs
- FontFamily.cs
- XmlSchemaCompilationSettings.cs
- WebPartRestoreVerb.cs
- ImageField.cs
- CompositeCollectionView.cs
- UnionCodeGroup.cs
- InstanceOwner.cs
- ResourceSet.cs
- RefreshPropertiesAttribute.cs
- MessageSecurityOverMsmq.cs
- WebScriptMetadataInstanceContextProvider.cs
- XmlName.cs
- WebRequest.cs
- MaskedTextBoxTextEditorDropDown.cs
- DbUpdateCommandTree.cs
- HtmlWindowCollection.cs
- BuildProvider.cs
- DataTemplateKey.cs
- HandleExceptionArgs.cs