Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ErrorActivity.cs
- PagesSection.cs
- _ShellExpression.cs
- StructuralObject.cs
- DashStyle.cs
- NegotiateStream.cs
- XmlSchemaElement.cs
- WmlPanelAdapter.cs
- SharedConnectionWorkflowTransactionService.cs
- WebColorConverter.cs
- TextModifier.cs
- UrlPropertyAttribute.cs
- PeerApplication.cs
- StateMachineWorkflow.cs
- WpfXamlLoader.cs
- XmlSchemaExternal.cs
- SchemaManager.cs
- TypedTableHandler.cs
- DeviceContext.cs
- MasterPageCodeDomTreeGenerator.cs
- KeysConverter.cs
- ContentDisposition.cs
- SortedList.cs
- MD5CryptoServiceProvider.cs
- RootBuilder.cs
- FileReservationCollection.cs
- PrePostDescendentsWalker.cs
- bidPrivateBase.cs
- FixedSOMTable.cs
- ListSortDescriptionCollection.cs
- DataSourceControlBuilder.cs
- CryptoProvider.cs
- CatalogZoneAutoFormat.cs
- RightsManagementInformation.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- IItemContainerGenerator.cs
- PerformanceCounterPermissionAttribute.cs
- XmlSortKey.cs
- StylusPointCollection.cs
- ECDsa.cs
- AssemblyCollection.cs
- TriggerActionCollection.cs
- RenderingEventArgs.cs
- PictureBox.cs
- JsonReader.cs
- SiteMapDataSource.cs
- IntranetCredentialPolicy.cs
- Inflater.cs
- ListSortDescription.cs
- BuildTopDownAttribute.cs
- SByte.cs
- QueryStatement.cs
- TypeAccessException.cs
- MessageProperties.cs
- ObjectDataSourceView.cs
- DocumentCollection.cs
- OSFeature.cs
- PerformanceCounterManager.cs
- TypeInitializationException.cs
- Icon.cs
- RepeatBehavior.cs
- ListViewSelectEventArgs.cs
- MetadataWorkspace.cs
- ModifierKeysConverter.cs
- ConfigurationManagerHelper.cs
- TcpChannelListener.cs
- LinkedList.cs
- TimelineGroup.cs
- FilterElement.cs
- XmlLangPropertyAttribute.cs
- AsyncPostBackTrigger.cs
- Vector3DCollection.cs
- DataGridViewCellFormattingEventArgs.cs
- ConnectionProviderAttribute.cs
- X509Chain.cs
- DataTableMapping.cs
- _PooledStream.cs
- SqlConnection.cs
- _RequestCacheProtocol.cs
- XsdDuration.cs
- NoClickablePointException.cs
- UniqueIdentifierService.cs
- Profiler.cs
- OptimalBreakSession.cs
- InternalRelationshipCollection.cs
- RenderContext.cs
- ColumnMapCopier.cs
- assertwrapper.cs
- Variable.cs
- ActivityBuilder.cs
- SaveFileDialogDesigner.cs
- CodePageEncoding.cs
- PointLightBase.cs
- CommentEmitter.cs
- SpellerError.cs
- UriTemplateQueryValue.cs
- SegmentInfo.cs
- SqlConnectionManager.cs
- ServiceDescription.cs
- WebPartCloseVerb.cs