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
- StoragePropertyMapping.cs
- SystemGatewayIPAddressInformation.cs
- SpellerInterop.cs
- RemotingServices.cs
- XmlSchemaObjectCollection.cs
- TreeNode.cs
- ReferenceEqualityComparer.cs
- HttpHeaderCollection.cs
- ActivityXRefPropertyEditor.cs
- BufferManager.cs
- CustomError.cs
- login.cs
- DesigntimeLicenseContext.cs
- Cursors.cs
- ExceptionHandlersDesigner.cs
- PointLightBase.cs
- MonikerHelper.cs
- RelationshipManager.cs
- DropDownButton.cs
- Image.cs
- TextEndOfSegment.cs
- DbExpressionBuilder.cs
- LazyTextWriterCreator.cs
- ObjectStorage.cs
- ReadContentAsBinaryHelper.cs
- XmlArrayItemAttributes.cs
- TextEffect.cs
- TransformDescriptor.cs
- BitmapVisualManager.cs
- SiteMapNodeItem.cs
- FilteredAttributeCollection.cs
- TextSchema.cs
- TraceContextRecord.cs
- HandlerWithFactory.cs
- InternalPermissions.cs
- DBConcurrencyException.cs
- Compress.cs
- _ListenerResponseStream.cs
- WindowsPen.cs
- MemberAccessException.cs
- RoutedEventArgs.cs
- VirtualPathProvider.cs
- PermissionSetTriple.cs
- PriorityQueue.cs
- XsltLoader.cs
- TextParentUndoUnit.cs
- UntypedNullExpression.cs
- HMACSHA512.cs
- CodePropertyReferenceExpression.cs
- ColorIndependentAnimationStorage.cs
- ExceptionWrapper.cs
- Evidence.cs
- BitmapEffectGroup.cs
- diagnosticsswitches.cs
- PropertyPathConverter.cs
- XsltLoader.cs
- SessionStateSection.cs
- EntityContainer.cs
- NameValuePermission.cs
- UnsafeNativeMethods.cs
- StorageRoot.cs
- PolicyException.cs
- SafeLibraryHandle.cs
- DiagnosticTraceSource.cs
- TypeContext.cs
- AnchorEditor.cs
- ToolTip.cs
- XmlDataLoader.cs
- DbModificationCommandTree.cs
- ShutDownListener.cs
- ControlIdConverter.cs
- _NtlmClient.cs
- Timer.cs
- MemberAssignmentAnalysis.cs
- InternalMappingException.cs
- UserControlParser.cs
- ReliableMessagingVersion.cs
- SubMenuStyle.cs
- MdImport.cs
- PropertyHelper.cs
- Error.cs
- TableAdapterManagerMethodGenerator.cs
- ThreadStartException.cs
- XDeferredAxisSource.cs
- ContentOperations.cs
- StickyNoteContentControl.cs
- XhtmlBasicPageAdapter.cs
- Form.cs
- EmbeddedObject.cs
- RootDesignerSerializerAttribute.cs
- ColumnClickEvent.cs
- CodeTypeDeclaration.cs
- SimpleRecyclingCache.cs
- FtpRequestCacheValidator.cs
- SystemDropShadowChrome.cs
- WebPartManagerDesigner.cs
- RenderTargetBitmap.cs
- MessageBodyMemberAttribute.cs
- ButtonPopupAdapter.cs
- QilIterator.cs