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
- LinkDescriptor.cs
- MediaContextNotificationWindow.cs
- DynamicRendererThreadManager.cs
- UnsafeNativeMethods.cs
- DefaultEventAttribute.cs
- PersianCalendar.cs
- KoreanCalendar.cs
- FormClosedEvent.cs
- Ref.cs
- BaseTreeIterator.cs
- KeyEvent.cs
- MobileTemplatedControlDesigner.cs
- clipboard.cs
- AsymmetricSignatureDeformatter.cs
- NameService.cs
- SecurityToken.cs
- SymbolMethod.cs
- XMLSyntaxException.cs
- xamlnodes.cs
- HttpWebResponse.cs
- CompilationLock.cs
- SelectionService.cs
- GZipStream.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- NumericUpDownAccelerationCollection.cs
- ToolBarButtonClickEvent.cs
- ImageDrawing.cs
- ApplicationSecurityInfo.cs
- XPathSelfQuery.cs
- DataGridCellsPanel.cs
- EncryptRequest.cs
- Opcode.cs
- XamlReaderConstants.cs
- ImpersonateTokenRef.cs
- PropertyMap.cs
- WebPartMenuStyle.cs
- XamlFigureLengthSerializer.cs
- WebPartCollection.cs
- GroupByExpressionRewriter.cs
- WindowsRichEditRange.cs
- UInt32Storage.cs
- OdbcReferenceCollection.cs
- SystemKeyConverter.cs
- PeerApplicationLaunchInfo.cs
- XPathPatternBuilder.cs
- ObjectReferenceStack.cs
- GridToolTip.cs
- WebPartHelpVerb.cs
- basenumberconverter.cs
- TextBox.cs
- InternalBase.cs
- WebInvokeAttribute.cs
- StringFormat.cs
- EntityModelSchemaGenerator.cs
- ConfigurationLocationCollection.cs
- Group.cs
- FieldToken.cs
- InlineUIContainer.cs
- UInt64Storage.cs
- StateManagedCollection.cs
- MouseActionConverter.cs
- PartitionedStream.cs
- FocusManager.cs
- SqlDataSourceCache.cs
- DataAdapter.cs
- DescendantBaseQuery.cs
- MatrixTransform3D.cs
- PersonalizationProviderHelper.cs
- CriticalFinalizerObject.cs
- DefaultPropertyAttribute.cs
- XmlSchemaSet.cs
- EntitySqlQueryState.cs
- VScrollProperties.cs
- LogEntryUtils.cs
- oledbmetadatacollectionnames.cs
- MimeImporter.cs
- UInt64.cs
- Profiler.cs
- SocketInformation.cs
- StrongTypingException.cs
- Atom10FeedFormatter.cs
- RIPEMD160.cs
- CommandEventArgs.cs
- TextRunProperties.cs
- TransformPatternIdentifiers.cs
- SamlAuthenticationStatement.cs
- WebPartEditVerb.cs
- Rule.cs
- CodePrimitiveExpression.cs
- DataServiceRequestException.cs
- ToggleButton.cs
- ReadOnlyHierarchicalDataSource.cs
- codemethodreferenceexpression.cs
- SiteMapProvider.cs
- XmlElementList.cs
- SrgsToken.cs
- CompareInfo.cs
- Splitter.cs
- ViewUtilities.cs
- Graphics.cs