Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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); } } } // 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
- DPTypeDescriptorContext.cs
- WorkflowApplicationAbortedException.cs
- FrameworkContentElement.cs
- InputReportEventArgs.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ComNativeDescriptor.cs
- UserPreferenceChangingEventArgs.cs
- iisPickupDirectory.cs
- DeviceFilterDictionary.cs
- RightsManagementPermission.cs
- Span.cs
- KeyGesture.cs
- EntityProviderServices.cs
- RequestFactory.cs
- FileDialog.cs
- InterleavedZipPartStream.cs
- XamlSerializerUtil.cs
- TypeEnumerableViewSchema.cs
- querybuilder.cs
- LicFileLicenseProvider.cs
- CheckedPointers.cs
- RegexRunnerFactory.cs
- CompensationHandlingFilter.cs
- MulticastIPAddressInformationCollection.cs
- RootProfilePropertySettingsCollection.cs
- TextTreeUndo.cs
- InputScopeManager.cs
- RefreshEventArgs.cs
- Point3DAnimationUsingKeyFrames.cs
- HashCryptoHandle.cs
- URLString.cs
- WorkerRequest.cs
- BaseComponentEditor.cs
- MemberInfoSerializationHolder.cs
- FrameAutomationPeer.cs
- SequenceNumber.cs
- EventsTab.cs
- ListViewInsertionMark.cs
- EventLogException.cs
- FixedSOMPageElement.cs
- DynamicDiscoSearcher.cs
- SmtpNetworkElement.cs
- TraceHandlerErrorFormatter.cs
- SqlPersonalizationProvider.cs
- Barrier.cs
- XmlObjectSerializerReadContext.cs
- WindowsImpersonationContext.cs
- Simplifier.cs
- XPathChildIterator.cs
- StylusPointPropertyId.cs
- OleDbCommandBuilder.cs
- TextBlock.cs
- Char.cs
- OdbcTransaction.cs
- HttpCapabilitiesEvaluator.cs
- LookupBindingPropertiesAttribute.cs
- WebPartVerbCollection.cs
- SHA1Cng.cs
- dbenumerator.cs
- WhereaboutsReader.cs
- XsltOutput.cs
- SrgsToken.cs
- NativeCppClassAttribute.cs
- DataServiceException.cs
- ClientConfigurationSystem.cs
- PropertyGridEditorPart.cs
- CompoundFileIOPermission.cs
- _NTAuthentication.cs
- PlatformCulture.cs
- HttpListenerPrefixCollection.cs
- ProcessInputEventArgs.cs
- WindowInteropHelper.cs
- CookieParameter.cs
- ProxySimple.cs
- TimeSpanConverter.cs
- AssemblyAttributes.cs
- Preprocessor.cs
- TrackingAnnotationCollection.cs
- OrderedDictionaryStateHelper.cs
- TimeSpanOrInfiniteValidator.cs
- HtmlToClrEventProxy.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- GlobalProxySelection.cs
- InlineCollection.cs
- SliderAutomationPeer.cs
- EditorOptionAttribute.cs
- EndEvent.cs
- AnchoredBlock.cs
- TextReader.cs
- XmlWriterTraceListener.cs
- AsymmetricKeyExchangeDeformatter.cs
- SelectionPatternIdentifiers.cs
- GestureRecognizer.cs
- DependencyProperty.cs
- BitmapEffectInputData.cs
- RepeatButtonAutomationPeer.cs
- StylusPointCollection.cs
- WebSysDescriptionAttribute.cs
- DesignBindingValueUIHandler.cs
- FSWPathEditor.cs