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
- CustomValidator.cs
- MetaDataInfo.cs
- FilterQuery.cs
- DataGridSortCommandEventArgs.cs
- PageRouteHandler.cs
- DeploymentSection.cs
- ObjectReferenceStack.cs
- HostedTransportConfigurationManager.cs
- DataGridViewCellStyleConverter.cs
- BridgeDataReader.cs
- HostingPreferredMapPath.cs
- SqlRowUpdatedEvent.cs
- HttpCachePolicy.cs
- PKCS1MaskGenerationMethod.cs
- GetWinFXPath.cs
- PropertyInfoSet.cs
- DelegatingHeader.cs
- PrinterSettings.cs
- DataGridViewCellStateChangedEventArgs.cs
- DateTimeParse.cs
- BufferBuilder.cs
- XmlTextReaderImplHelpers.cs
- AttachedPropertiesService.cs
- loginstatus.cs
- PropertyEmitterBase.cs
- Int16.cs
- WindowsMenu.cs
- QuaternionAnimationUsingKeyFrames.cs
- MenuItem.cs
- WebMessageFormatHelper.cs
- AdjustableArrowCap.cs
- ProfileModule.cs
- QueryOptionExpression.cs
- ClientRolePrincipal.cs
- UmAlQuraCalendar.cs
- RemotingConfiguration.cs
- GridViewDeleteEventArgs.cs
- WorkflowRuntimeService.cs
- TlsSspiNegotiation.cs
- CachedTypeface.cs
- ZipPackagePart.cs
- WebServiceTypeData.cs
- RichTextBox.cs
- AuthenticationManager.cs
- PageParserFilter.cs
- XmlQualifiedNameTest.cs
- OleDbEnumerator.cs
- ThicknessConverter.cs
- XamlTypeWithExplicitNamespace.cs
- PageOutputColor.cs
- DataSourceListEditor.cs
- HttpPostedFile.cs
- Frame.cs
- ExpressionWriter.cs
- AsyncStreamReader.cs
- ListView.cs
- StorageSetMapping.cs
- ComponentChangedEvent.cs
- SiteIdentityPermission.cs
- TextBlockAutomationPeer.cs
- RegistryDataKey.cs
- DefaultValueMapping.cs
- ReachUIElementCollectionSerializer.cs
- Header.cs
- BinaryFormatterWriter.cs
- RelationalExpressions.cs
- DescriptionCreator.cs
- BinaryObjectWriter.cs
- ToolbarAUtomationPeer.cs
- ComplexTypeEmitter.cs
- NativeRightsManagementAPIsStructures.cs
- _TransmitFileOverlappedAsyncResult.cs
- CheckBoxAutomationPeer.cs
- DoubleStorage.cs
- ValueProviderWrapper.cs
- Color.cs
- MarginCollapsingState.cs
- Identifier.cs
- DesignerActionUIService.cs
- HttpCacheVaryByContentEncodings.cs
- InvalidAsynchronousStateException.cs
- SecurityToken.cs
- NonVisualControlAttribute.cs
- DragDropManager.cs
- DetailsViewActionList.cs
- OutgoingWebResponseContext.cs
- DocumentSequence.cs
- JsonCollectionDataContract.cs
- Track.cs
- RequiredFieldValidator.cs
- SiteMapSection.cs
- AlternationConverter.cs
- ScaleTransform3D.cs
- XmlNodeComparer.cs
- ResXResourceSet.cs
- SafePEFileHandle.cs
- ExpressionBuilder.cs
- XmlQueryContext.cs
- Matrix.cs
- LinkButton.cs