Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Hosting / ApplicationHost.cs / 2 / ApplicationHost.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Hosting { using System; using System.IO; using System.Collections; using System.Globalization; using System.Runtime.InteropServices; using System.Runtime.Remoting; using System.Web; using System.Web.Configuration; using System.Web.Util; using System.Security.Permissions; ////// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class ApplicationHost { private ApplicationHost() { } /* * Creates new app domain for hosting of ASP.NET apps with a * user defined 'host' object in it. The host is needed to make * cross-domain calls to process requests in the host's app domain */ ///[To be supplied.] ////// [SecurityPermission(SecurityAction.Demand, Unrestricted=true)] public static Object CreateApplicationHost(Type hostType, String virtualDir, String physicalDir) { #if !FEATURE_PAL // FEATURE_PAL does not require PlatformID.Win32NT if (Environment.OSVersion.Platform != PlatformID.Win32NT) throw new PlatformNotSupportedException(SR.GetString(SR.RequiresNT)); #else // !FEATURE_PAL // FEATURE_PAL #endif // !FEATURE_PAL if (!StringUtil.StringEndsWith(physicalDir, Path.DirectorySeparatorChar)) physicalDir = physicalDir + Path.DirectorySeparatorChar; ApplicationManager appManager = ApplicationManager.GetApplicationManager(); String appId = (String.Concat(virtualDir, physicalDir).GetHashCode()).ToString("x"); ObjectHandle h = appManager.CreateInstanceInNewWorkerAppDomain( hostType, appId, VirtualPath.CreateNonRelative(virtualDir), physicalDir); return h.Unwrap(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Hosting { using System; using System.IO; using System.Collections; using System.Globalization; using System.Runtime.InteropServices; using System.Runtime.Remoting; using System.Web; using System.Web.Configuration; using System.Web.Util; using System.Security.Permissions; ////// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class ApplicationHost { private ApplicationHost() { } /* * Creates new app domain for hosting of ASP.NET apps with a * user defined 'host' object in it. The host is needed to make * cross-domain calls to process requests in the host's app domain */ ///[To be supplied.] ////// [SecurityPermission(SecurityAction.Demand, Unrestricted=true)] public static Object CreateApplicationHost(Type hostType, String virtualDir, String physicalDir) { #if !FEATURE_PAL // FEATURE_PAL does not require PlatformID.Win32NT if (Environment.OSVersion.Platform != PlatformID.Win32NT) throw new PlatformNotSupportedException(SR.GetString(SR.RequiresNT)); #else // !FEATURE_PAL // FEATURE_PAL #endif // !FEATURE_PAL if (!StringUtil.StringEndsWith(physicalDir, Path.DirectorySeparatorChar)) physicalDir = physicalDir + Path.DirectorySeparatorChar; ApplicationManager appManager = ApplicationManager.GetApplicationManager(); String appId = (String.Concat(virtualDir, physicalDir).GetHashCode()).ToString("x"); ObjectHandle h = appManager.CreateInstanceInNewWorkerAppDomain( hostType, appId, VirtualPath.CreateNonRelative(virtualDir), physicalDir); return h.Unwrap(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GridItemProviderWrapper.cs
- X509ChainPolicy.cs
- WebPartZoneBase.cs
- SchemaImporter.cs
- ObjectResult.cs
- ToolStripPanelRenderEventArgs.cs
- AppDomainManager.cs
- NativeCompoundFileAPIs.cs
- DbgUtil.cs
- BatchParser.cs
- GenericTextProperties.cs
- Endpoint.cs
- RequestCachePolicyConverter.cs
- XmlObjectSerializerWriteContextComplex.cs
- DataGridCellsPresenter.cs
- StringUtil.cs
- PropertyKey.cs
- TypeBuilderInstantiation.cs
- NullableDecimalSumAggregationOperator.cs
- OdbcFactory.cs
- CategoryNameCollection.cs
- RtfControlWordInfo.cs
- ScrollEvent.cs
- EntityTypeBase.cs
- ImageBrush.cs
- BuildProviderUtils.cs
- SqlAliaser.cs
- SimpleTypeResolver.cs
- DependencyPropertyDescriptor.cs
- TypeUtils.cs
- HandlerFactoryCache.cs
- Size3D.cs
- BitmapMetadataBlob.cs
- FixedFindEngine.cs
- XmlAttributes.cs
- XmlSchemaAttribute.cs
- VisualBasicValue.cs
- arabicshape.cs
- ThicknessAnimation.cs
- TemporaryBitmapFile.cs
- TdsParserSafeHandles.cs
- KnownBoxes.cs
- SelectionEditingBehavior.cs
- NumericExpr.cs
- _HeaderInfo.cs
- BuildProvider.cs
- ToolStripItemImageRenderEventArgs.cs
- thaishape.cs
- ConfigurationSectionHelper.cs
- ChangesetResponse.cs
- GridPattern.cs
- CssClassPropertyAttribute.cs
- UncommonField.cs
- TextRunCacheImp.cs
- MiniLockedBorderGlyph.cs
- FlowDocumentView.cs
- BamlLocalizabilityResolver.cs
- CDSsyncETWBCLProvider.cs
- Unit.cs
- SpeechAudioFormatInfo.cs
- RegexTree.cs
- SubpageParaClient.cs
- PenCursorManager.cs
- RangeValueProviderWrapper.cs
- coordinatorfactory.cs
- BinHexEncoder.cs
- AttachedPropertyDescriptor.cs
- CodeSubDirectory.cs
- WsatTransactionInfo.cs
- NoPersistScope.cs
- LoadGrammarCompletedEventArgs.cs
- EdmPropertyAttribute.cs
- OutputCacheSettingsSection.cs
- CalendarDay.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- WorkflowRuntimeServiceElementCollection.cs
- CodeExporter.cs
- MenuAdapter.cs
- XLinq.cs
- ISessionStateStore.cs
- MenuRenderer.cs
- ControlIdConverter.cs
- XmlNotation.cs
- RangeValueProviderWrapper.cs
- InstanceDescriptor.cs
- TriggerBase.cs
- WrappedOptions.cs
- EntityObject.cs
- bidPrivateBase.cs
- XmlWriter.cs
- PtsHost.cs
- ScriptingAuthenticationServiceSection.cs
- EventArgs.cs
- SingleObjectCollection.cs
- XmlSchemaExternal.cs
- Line.cs
- DeferredReference.cs
- HtmlInputSubmit.cs
- DrawListViewItemEventArgs.cs
- WebPartTransformerCollection.cs