Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / Hosting / ApplicationHost.cs / 1 / 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. //------------------------------------------------------------------------------ //[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.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ClosureBinding.cs
- RuntimeEnvironment.cs
- InvalidDataException.cs
- SmtpDateTime.cs
- InfoCardTraceRecord.cs
- InvokeCompletedEventArgs.cs
- RegexFCD.cs
- ComponentDispatcher.cs
- NativeObjectSecurity.cs
- DropTarget.cs
- DrawingBrush.cs
- ThreadAttributes.cs
- CalendarDay.cs
- VideoDrawing.cs
- ToolboxBitmapAttribute.cs
- IntranetCredentialPolicy.cs
- SqlCrossApplyToCrossJoin.cs
- TextElementAutomationPeer.cs
- ExternalException.cs
- XNodeSchemaApplier.cs
- CommandCollectionEditor.cs
- ItemDragEvent.cs
- Roles.cs
- TextTrailingCharacterEllipsis.cs
- Calendar.cs
- Trace.cs
- ResourceContainerWrapper.cs
- TextBoxBase.cs
- PriorityQueue.cs
- Stopwatch.cs
- ImmutableObjectAttribute.cs
- OrderPreservingMergeHelper.cs
- ReadOnlyAttribute.cs
- TypeDelegator.cs
- TcpClientChannel.cs
- DataBindingHandlerAttribute.cs
- ProxyFragment.cs
- TripleDES.cs
- UnsafeNativeMethods.cs
- RepeaterItemEventArgs.cs
- RequestTimeoutManager.cs
- OverlappedContext.cs
- AdPostCacheSubstitution.cs
- XmlSchemaObjectCollection.cs
- CLSCompliantAttribute.cs
- ManagementObjectCollection.cs
- GraphicsPathIterator.cs
- linebase.cs
- RegexCode.cs
- GorillaCodec.cs
- SafeFileHandle.cs
- NamespaceCollection.cs
- SmtpReplyReaderFactory.cs
- ISAPIRuntime.cs
- IdentitySection.cs
- Transform3DGroup.cs
- BinaryConverter.cs
- UInt64Storage.cs
- XmlSerializerAssemblyAttribute.cs
- EntityClientCacheKey.cs
- SqlUnionizer.cs
- NativeMethods.cs
- LayoutEditorPart.cs
- PropertiesTab.cs
- StringSource.cs
- ServicesUtilities.cs
- printdlgexmarshaler.cs
- LinkClickEvent.cs
- SelectionList.cs
- IResourceProvider.cs
- SystemIPGlobalProperties.cs
- ErrorProvider.cs
- AnnotationMap.cs
- BitVector32.cs
- FixedPageAutomationPeer.cs
- BasicCellRelation.cs
- ProfileSettings.cs
- DetailsViewModeEventArgs.cs
- XmlSchemaNotation.cs
- BasePattern.cs
- VisualTransition.cs
- DateTimeAutomationPeer.cs
- PointF.cs
- Exception.cs
- SnapLine.cs
- ContentType.cs
- WebServicesInteroperability.cs
- XmlWriter.cs
- DebugTracing.cs
- FormViewDeleteEventArgs.cs
- InternalBase.cs
- AdPostCacheSubstitution.cs
- unitconverter.cs
- XsdDateTime.cs
- ContractMapping.cs
- SignatureDescription.cs
- SelectedDatesCollection.cs
- RotateTransform.cs
- InvariantComparer.cs
- PropertyOverridesDialog.cs