Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Hosting / ProcessHostFactoryHelper.cs / 1305376 / 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)]
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);
}
public sealed class ProcessHostFactoryHelper : MarshalByRefObject, IProcessHostFactoryHelper {
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;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// 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)]
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);
}
public sealed class ProcessHostFactoryHelper : MarshalByRefObject, IProcessHostFactoryHelper {
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;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SafePEFileHandle.cs
- NumericPagerField.cs
- HtmlMobileTextWriter.cs
- RadioButton.cs
- designeractionbehavior.cs
- MenuItem.cs
- BatchParser.cs
- ChooseAction.cs
- Rectangle.cs
- RuntimeConfigLKG.cs
- CodeTypeMemberCollection.cs
- messageonlyhwndwrapper.cs
- TableCellAutomationPeer.cs
- BufferedStream.cs
- SettingsBindableAttribute.cs
- AutomationPattern.cs
- NoPersistScope.cs
- NotifyInputEventArgs.cs
- DecoderFallback.cs
- TypeUtils.cs
- Figure.cs
- Visual3D.cs
- WorkflowQueue.cs
- BinHexEncoding.cs
- DeferrableContent.cs
- XmlNode.cs
- FastEncoder.cs
- ConfigXmlCDataSection.cs
- ModelPerspective.cs
- TypedTableHandler.cs
- EventLogPermissionAttribute.cs
- TextContainer.cs
- GeneralTransform3DGroup.cs
- SystemWebCachingSectionGroup.cs
- XmlTextReader.cs
- ParameterCollection.cs
- UseLicense.cs
- sqlpipe.cs
- RelationshipConstraintValidator.cs
- NotFiniteNumberException.cs
- ArgumentOutOfRangeException.cs
- ProviderUtil.cs
- XmlReturnReader.cs
- ConvertEvent.cs
- NumericPagerField.cs
- XsdBuildProvider.cs
- GPStream.cs
- IteratorAsyncResult.cs
- ThrowHelper.cs
- UnaryNode.cs
- InkCollectionBehavior.cs
- KoreanLunisolarCalendar.cs
- PropertyValue.cs
- AsyncResult.cs
- SelectionPatternIdentifiers.cs
- CellTreeNodeVisitors.cs
- storepermission.cs
- SHA512Managed.cs
- TrustManagerPromptUI.cs
- DrawingDrawingContext.cs
- PolicyStatement.cs
- InstanceOwnerQueryResult.cs
- CaseExpr.cs
- DataGridComponentEditor.cs
- UnconditionalPolicy.cs
- PrintingPermissionAttribute.cs
- XsltOutput.cs
- UnicastIPAddressInformationCollection.cs
- SecurityContextSecurityTokenAuthenticator.cs
- NumericUpDown.cs
- SymbolType.cs
- FacetDescriptionElement.cs
- XmlDataImplementation.cs
- QuaternionRotation3D.cs
- XmlCharCheckingWriter.cs
- LoginName.cs
- PerspectiveCamera.cs
- GuidConverter.cs
- HtmlTable.cs
- DataStreams.cs
- HttpCookie.cs
- SqlDataReader.cs
- WebBrowserEvent.cs
- MsmqProcessProtocolHandler.cs
- PageAsyncTask.cs
- App.cs
- PaginationProgressEventArgs.cs
- SettingsPropertyCollection.cs
- hebrewshape.cs
- TableCell.cs
- ProcessHostMapPath.cs
- WindowsListViewItem.cs
- OleDbDataReader.cs
- CatalogPartCollection.cs
- VerificationException.cs
- ToolStripItemRenderEventArgs.cs
- ColumnWidthChangingEvent.cs
- DataServiceKeyAttribute.cs
- MarshalByValueComponent.cs
- Scripts.cs