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
- PackageDigitalSignature.cs
- AutomationAttributeInfo.cs
- SqlCachedBuffer.cs
- Light.cs
- _LoggingObject.cs
- ExtenderControl.cs
- TextAnchor.cs
- DefaultPropertyAttribute.cs
- Rules.cs
- BookmarkEventArgs.cs
- WriteTimeStream.cs
- OrthographicCamera.cs
- NativeMethods.cs
- ServerType.cs
- StreamUpgradeAcceptor.cs
- BlurBitmapEffect.cs
- DocumentXPathNavigator.cs
- smtppermission.cs
- MetadataHelper.cs
- ForEachAction.cs
- X509DefaultServiceCertificateElement.cs
- validationstate.cs
- InkCollectionBehavior.cs
- XhtmlBasicPanelAdapter.cs
- CqlParser.cs
- CompoundFileStreamReference.cs
- DoubleMinMaxAggregationOperator.cs
- CorrelationKey.cs
- ServiceDescriptionReflector.cs
- DrawingContext.cs
- TextChangedEventArgs.cs
- XmlMembersMapping.cs
- SBCSCodePageEncoding.cs
- WebProxyScriptElement.cs
- QueryStringConverter.cs
- TraceInternal.cs
- Enlistment.cs
- MetadataItemCollectionFactory.cs
- UriScheme.cs
- XhtmlBasicFormAdapter.cs
- ITextView.cs
- MenuRendererClassic.cs
- HashLookup.cs
- DependencyPropertyDescriptor.cs
- PolyLineSegmentFigureLogic.cs
- SiteMapPath.cs
- RequestCachePolicy.cs
- WebServiceAttribute.cs
- UshortList2.cs
- SqlConnectionFactory.cs
- DPCustomTypeDescriptor.cs
- LookupNode.cs
- Shape.cs
- SurrogateSelector.cs
- WithStatement.cs
- LinkedResource.cs
- StylusEditingBehavior.cs
- followingsibling.cs
- VisualStyleInformation.cs
- DelegatingConfigHost.cs
- SerializationObjectManager.cs
- RefExpr.cs
- QuaternionAnimationUsingKeyFrames.cs
- OutputScopeManager.cs
- FieldTemplateUserControl.cs
- GeometryGroup.cs
- TextRunCache.cs
- StringUtil.cs
- StylusEditingBehavior.cs
- WMIInterop.cs
- MessageDesigner.cs
- CodeConstructor.cs
- AttributeCollection.cs
- Stylesheet.cs
- MouseOverProperty.cs
- InvokePattern.cs
- ShaperBuffers.cs
- MetadataResolver.cs
- SpeakInfo.cs
- FontSource.cs
- AbstractExpressions.cs
- LocalizationCodeDomSerializer.cs
- ManagementScope.cs
- ZipFileInfoCollection.cs
- SequentialOutput.cs
- embossbitmapeffect.cs
- ReflectionUtil.cs
- SamlAttributeStatement.cs
- ResourceReferenceExpressionConverter.cs
- CodeDomSerializerBase.cs
- ZipFileInfoCollection.cs
- ProxyHelper.cs
- DataGridViewCell.cs
- ChangeInterceptorAttribute.cs
- UrlAuthorizationModule.cs
- TextSerializer.cs
- ControlBuilder.cs
- UIElement.cs
- SafeFileHandle.cs
- WebScriptServiceHostFactory.cs