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
- DesignerActionPanel.cs
- HandlerFactoryWrapper.cs
- DataPagerFieldCommandEventArgs.cs
- ColorConverter.cs
- RuntimeHelpers.cs
- MediaContextNotificationWindow.cs
- LogFlushAsyncResult.cs
- WindowVisualStateTracker.cs
- ServicePointManagerElement.cs
- _emptywebproxy.cs
- MarkupCompiler.cs
- Path.cs
- OdbcStatementHandle.cs
- TCPListener.cs
- CommandSet.cs
- ThemeDictionaryExtension.cs
- TemplateAction.cs
- FixedHyperLink.cs
- DataGridViewCellPaintingEventArgs.cs
- OptimizedTemplateContentHelper.cs
- PrinterResolution.cs
- MouseEvent.cs
- ShapingWorkspace.cs
- PrivateFontCollection.cs
- ClientTargetSection.cs
- NestPullup.cs
- SafeCertificateStore.cs
- InstanceOwner.cs
- SimpleHandlerBuildProvider.cs
- BindUriHelper.cs
- MobileContainerDesigner.cs
- EntityUtil.cs
- JsonDataContract.cs
- DataGridViewCellCancelEventArgs.cs
- SpecialNameAttribute.cs
- ExtensionQuery.cs
- MatrixCamera.cs
- PermissionAttributes.cs
- BaseDataListComponentEditor.cs
- JoinGraph.cs
- HtmlCommandAdapter.cs
- Transform3DCollection.cs
- KeyTime.cs
- PropertyGroupDescription.cs
- propertyentry.cs
- Line.cs
- GenericIdentity.cs
- DocumentPaginator.cs
- LinqDataView.cs
- DataBoundControlAdapter.cs
- HeaderedContentControl.cs
- XslAst.cs
- PhysicalFontFamily.cs
- ValidationHelpers.cs
- IdentityNotMappedException.cs
- Preprocessor.cs
- SqlDependencyUtils.cs
- CodeAttributeDeclaration.cs
- StringValueConverter.cs
- FtpRequestCacheValidator.cs
- TextBoxAutoCompleteSourceConverter.cs
- SamlAuthorizationDecisionStatement.cs
- GPPOINT.cs
- RewritingSimplifier.cs
- UnsafePeerToPeerMethods.cs
- RequestNavigateEventArgs.cs
- HeaderUtility.cs
- Bidi.cs
- BitmapSource.cs
- AvtEvent.cs
- DrawingCollection.cs
- TextRangeEdit.cs
- PrimaryKeyTypeConverter.cs
- GroupDescription.cs
- ResourceReader.cs
- EtwProvider.cs
- MouseDevice.cs
- IxmlLineInfo.cs
- XmlTextReaderImplHelpers.cs
- Brush.cs
- ThreadAbortException.cs
- FragmentQuery.cs
- CodeNamespaceImport.cs
- RowVisual.cs
- BlurBitmapEffect.cs
- HtmlControl.cs
- DataGridItem.cs
- XPathDescendantIterator.cs
- TcpAppDomainProtocolHandler.cs
- QueryOperatorEnumerator.cs
- DataGridToolTip.cs
- CompiledQueryCacheKey.cs
- GridViewRowEventArgs.cs
- SiteMapDataSource.cs
- CommonRemoteMemoryBlock.cs
- ResourceContainer.cs
- DefaultAsyncDataDispatcher.cs
- AcceptorSessionSymmetricMessageSecurityProtocol.cs
- CustomValidator.cs
- RangeValidator.cs