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
- SendKeys.cs
- SchemaCreator.cs
- FirstQueryOperator.cs
- IisTraceWebEventProvider.cs
- SqlEnums.cs
- Comparer.cs
- XPathConvert.cs
- Exception.cs
- SynchronizationLockException.cs
- DiscreteKeyFrames.cs
- NativeCppClassAttribute.cs
- ControlEvent.cs
- ParserOptions.cs
- SymmetricKeyWrap.cs
- StyleCollection.cs
- DataContractSerializerOperationGenerator.cs
- SqlDataSourceAdvancedOptionsForm.cs
- SBCSCodePageEncoding.cs
- DialogWindow.cs
- basecomparevalidator.cs
- ExpandCollapseProviderWrapper.cs
- SafeViewOfFileHandle.cs
- RequestCacheValidator.cs
- ScrollableControl.cs
- HttpWebRequest.cs
- ProgressBarHighlightConverter.cs
- BrowserCapabilitiesFactory.cs
- XamlVector3DCollectionSerializer.cs
- MaterialGroup.cs
- ListCommandEventArgs.cs
- Html32TextWriter.cs
- TemplateControlParser.cs
- Site.cs
- SqlStatistics.cs
- RegistryConfigurationProvider.cs
- XmlDataImplementation.cs
- ScriptControlManager.cs
- LocalizationParserHooks.cs
- NullableBoolConverter.cs
- StreamAsIStream.cs
- WindowsListViewItem.cs
- StopStoryboard.cs
- TreeNodeConverter.cs
- LocalizableResourceBuilder.cs
- TrayIconDesigner.cs
- Configuration.cs
- TextBoxView.cs
- BindingOperations.cs
- CollectionBuilder.cs
- RegexWorker.cs
- DetailsView.cs
- BehaviorEditorPart.cs
- ReversePositionQuery.cs
- BooleanKeyFrameCollection.cs
- StringPropertyBuilder.cs
- FixedSOMPage.cs
- TextEndOfLine.cs
- DeviceSpecificDesigner.cs
- BinaryConverter.cs
- ValidatorUtils.cs
- coordinatorfactory.cs
- Adorner.cs
- NameObjectCollectionBase.cs
- CompileLiteralTextParser.cs
- RayHitTestParameters.cs
- WebServiceParameterData.cs
- ResolvedKeyFrameEntry.cs
- SafeFindHandle.cs
- RoutingExtension.cs
- CurrentChangedEventManager.cs
- ObjectStateEntry.cs
- SparseMemoryStream.cs
- AdornerLayer.cs
- FlowLayout.cs
- VisualStyleRenderer.cs
- securestring.cs
- Localizer.cs
- userdatakeys.cs
- ManagedIStream.cs
- PresentationAppDomainManager.cs
- Renderer.cs
- BaseCollection.cs
- FormsIdentity.cs
- ZoomPercentageConverter.cs
- DBAsyncResult.cs
- DataGridSortCommandEventArgs.cs
- ExpressionNormalizer.cs
- AggregateNode.cs
- WindowsScroll.cs
- MailAddressParser.cs
- SafeCertificateContext.cs
- ExpressionVisitorHelpers.cs
- RecordManager.cs
- FixedSOMTextRun.cs
- ButtonFieldBase.cs
- DataGridViewRowsAddedEventArgs.cs
- GroupItem.cs
- SymLanguageVendor.cs
- PointF.cs
- PointConverter.cs