Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / ImpersonateTokenRef.cs / 1 / ImpersonateTokenRef.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; using System.Web.Util; using System.Web.Configuration; // class IdentitySection internal sealed class ImpersonateTokenRef : IDisposable { private IntPtr _handle; internal ImpersonateTokenRef(IntPtr token) { _handle = token; } internal IntPtr Handle { get { return _handle; } } // The handle can be kept alive by HttpContext.s_appIdentityConfig (see ASURT#121815) ~ImpersonateTokenRef() { if (_handle != IntPtr.Zero) { UnsafeNativeMethods.CloseHandle(_handle); _handle = IntPtr.Zero; } } void IDisposable.Dispose() { if (_handle != IntPtr.Zero) { UnsafeNativeMethods.CloseHandle(_handle); _handle = IntPtr.Zero; } GC.SuppressFinalize(this); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- X509ServiceCertificateAuthentication.cs
- ContainerActivationHelper.cs
- UshortList2.cs
- SpellCheck.cs
- NetCodeGroup.cs
- AsyncStreamReader.cs
- GeneratedContractType.cs
- XmlLangPropertyAttribute.cs
- GeneratedContractType.cs
- FileEnumerator.cs
- TextMetrics.cs
- WindowsServiceElement.cs
- ChangeBlockUndoRecord.cs
- OutOfProcStateClientManager.cs
- EntityDataSourceDesignerHelper.cs
- ObjectAnimationBase.cs
- InvalidOperationException.cs
- SqlInternalConnection.cs
- TypeReference.cs
- PasswordTextContainer.cs
- GeneratedContractType.cs
- XmlSchema.cs
- XmlStringTable.cs
- DbConnectionPoolGroup.cs
- DetailsViewPagerRow.cs
- PropertyValueChangedEvent.cs
- EncoderExceptionFallback.cs
- TextSelectionHighlightLayer.cs
- GridViewUpdateEventArgs.cs
- AdPostCacheSubstitution.cs
- Cursor.cs
- _DynamicWinsockMethods.cs
- EventLevel.cs
- StyleConverter.cs
- KeyValuePair.cs
- StyleHelper.cs
- StackOverflowException.cs
- ProfilePropertySettingsCollection.cs
- ClientRuntimeConfig.cs
- PersistenceProviderBehavior.cs
- RadioButtonList.cs
- PassportAuthentication.cs
- WebBrowserPermission.cs
- ImpersonationContext.cs
- UpdatableWrapper.cs
- MissingSatelliteAssemblyException.cs
- CommittableTransaction.cs
- FactoryMaker.cs
- XhtmlCssHandler.cs
- XsltConvert.cs
- TypeGeneratedEventArgs.cs
- CommandManager.cs
- SiteMapNodeItem.cs
- StateManagedCollection.cs
- HelpOperationInvoker.cs
- CachedTypeface.cs
- UnaryExpressionHelper.cs
- SynchronizationContextHelper.cs
- WebBrowserNavigatedEventHandler.cs
- EditBehavior.cs
- SBCSCodePageEncoding.cs
- controlskin.cs
- ISAPIRuntime.cs
- TaskFileService.cs
- CodeMethodMap.cs
- ContainerControlDesigner.cs
- SHA1CryptoServiceProvider.cs
- SelectionItemPattern.cs
- ViewGenerator.cs
- CompilationLock.cs
- XmlUtf8RawTextWriter.cs
- AdRotatorDesigner.cs
- HotCommands.cs
- PrintDialog.cs
- graph.cs
- AutoGeneratedFieldProperties.cs
- CacheMemory.cs
- TrackingMemoryStreamFactory.cs
- IxmlLineInfo.cs
- RectangleGeometry.cs
- RemoteAsymmetricSignatureFormatter.cs
- ExtensionWindowHeader.cs
- QueryTaskGroupState.cs
- CheckBoxFlatAdapter.cs
- ListViewPagedDataSource.cs
- IQueryable.cs
- Hyperlink.cs
- CqlLexerHelpers.cs
- CapacityStreamGeometryContext.cs
- TemplateField.cs
- ChtmlTextWriter.cs
- Vector3DCollectionValueSerializer.cs
- GenericsInstances.cs
- AuthorizationRule.cs
- StylusPointCollection.cs
- XamlFxTrace.cs
- TemplatedWizardStep.cs
- ProviderConnectionPointCollection.cs
- PropertyDescriptor.cs
- AssemblyBuilderData.cs