Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Hosting / ProcessHostFactoryHelper.cs / 4 / ProcessHostFactoryHelper.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Hosting {
using System;
using System.Collections;
using System.Configuration;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Web;
using System.Web.Configuration;
using System.Web.Util;
[ComImport, Guid("02fd465d-5c5d-4b7e-95b6-82faa031b74a"), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public interface IProcessHostFactoryHelper {
#if FEATURE_PAL // FEATURE_PAL does not enable COM
[return: MarshalAs(UnmanagedType.Error)]
#else // FEATURE_PAL
[return: MarshalAs(UnmanagedType.Interface)]
#endif // FEATURE_PAL
Object GetProcessHost(IProcessHostSupportFunctions functions);
}
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class ProcessHostFactoryHelper : MarshalByRefObject, IProcessHostFactoryHelper {
[AspNetHostingPermission(SecurityAction.Demand, Level=AspNetHostingPermissionLevel.Minimal)]
public ProcessHostFactoryHelper() {
}
[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.Infrastructure)]
public override Object InitializeLifetimeService() {
return null; // never expire lease
}
public Object GetProcessHost(IProcessHostSupportFunctions functions) {
try {
return ProcessHost.GetProcessHost(functions);
}
catch(Exception e) {
Misc.ReportUnhandledException(e, new string[] {SR.GetString(SR.Cant_Create_Process_Host)});
throw;
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LogSwitch.cs
- ItemCheckedEvent.cs
- SoapProtocolImporter.cs
- GrammarBuilder.cs
- URLIdentityPermission.cs
- CodeCastExpression.cs
- SiteMapPathDesigner.cs
- CodeTryCatchFinallyStatement.cs
- CngProvider.cs
- SqlError.cs
- xdrvalidator.cs
- RegexFCD.cs
- webeventbuffer.cs
- SqlProviderServices.cs
- PathFigure.cs
- ThousandthOfEmRealDoubles.cs
- FlagsAttribute.cs
- columnmapfactory.cs
- ClientData.cs
- WebChannelFactory.cs
- DeviceContext.cs
- DataTransferEventArgs.cs
- SelectionItemProviderWrapper.cs
- WorkflowDesignerColors.cs
- WorkflowViewService.cs
- X509Chain.cs
- ConsoleKeyInfo.cs
- CacheChildrenQuery.cs
- X509UI.cs
- NamedServiceModelExtensionCollectionElement.cs
- DocumentAutomationPeer.cs
- Compensate.cs
- ProfilePropertySettingsCollection.cs
- CurrencyManager.cs
- ButtonChrome.cs
- FrameworkObject.cs
- XmlLangPropertyAttribute.cs
- BitmapImage.cs
- ComplexTypeEmitter.cs
- TypedReference.cs
- RectAnimation.cs
- login.cs
- FrameworkContextData.cs
- HtmlInputPassword.cs
- ScriptingSectionGroup.cs
- AggregateException.cs
- SqlBuilder.cs
- NetCodeGroup.cs
- ADConnectionHelper.cs
- SpellerHighlightLayer.cs
- DataGridViewCellStyleEditor.cs
- ConsumerConnectionPoint.cs
- MobileResource.cs
- X509RawDataKeyIdentifierClause.cs
- SqlDataSourceFilteringEventArgs.cs
- DeferredRunTextReference.cs
- BitmapPalette.cs
- ArrayMergeHelper.cs
- RuntimeIdentifierPropertyAttribute.cs
- ConstructorArgumentAttribute.cs
- FieldTemplateUserControl.cs
- ReferenceEqualityComparer.cs
- BitStream.cs
- securestring.cs
- PiiTraceSource.cs
- AncestorChangedEventArgs.cs
- SortedDictionary.cs
- behaviorssection.cs
- BrowserCapabilitiesFactory35.cs
- DataGridItemEventArgs.cs
- SimplePropertyEntry.cs
- RedistVersionInfo.cs
- TogglePattern.cs
- BaseInfoTable.cs
- ProjectionPruner.cs
- PersonalizationStateInfo.cs
- FormsAuthenticationTicket.cs
- SafeHandle.cs
- NumericPagerField.cs
- NameSpaceEvent.cs
- ColumnCollection.cs
- OdbcStatementHandle.cs
- commandenforcer.cs
- ZipPackagePart.cs
- FreeFormDragDropManager.cs
- WSDualHttpSecurityMode.cs
- rsa.cs
- FontUnit.cs
- _SafeNetHandles.cs
- ListBoxItemWrapperAutomationPeer.cs
- NativeCppClassAttribute.cs
- Hashtable.cs
- TaskbarItemInfo.cs
- PassportPrincipal.cs
- Condition.cs
- SplitterPanel.cs
- MenuEventArgs.cs
- HttpModuleActionCollection.cs
- QilFunction.cs
- IdleTimeoutMonitor.cs