Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Hosting / ApplicationHost.cs / 1305376 / 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; ////// 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; ////// 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
- WebPartDescriptionCollection.cs
- ComponentResourceKeyConverter.cs
- OleDbPermission.cs
- PerfService.cs
- ConnectionManagementSection.cs
- BevelBitmapEffect.cs
- CompoundFileStorageReference.cs
- XmlSchemaValidator.cs
- Interlocked.cs
- FilteredXmlReader.cs
- JsonByteArrayDataContract.cs
- ISAPIRuntime.cs
- TemplateXamlParser.cs
- TableLayoutColumnStyleCollection.cs
- KeyValueSerializer.cs
- TableParagraph.cs
- CalendarButtonAutomationPeer.cs
- LocatorPartList.cs
- EntityFrameworkVersions.cs
- ExtendedPropertyDescriptor.cs
- KeysConverter.cs
- TextDecoration.cs
- ToolStrip.cs
- KnownTypesHelper.cs
- BaseDataListActionList.cs
- HtmlFormWrapper.cs
- SplitContainer.cs
- EntityDataSourceContextDisposingEventArgs.cs
- HTTP_SERVICE_CONFIG_URLACL_PARAM.cs
- PersonalizationDictionary.cs
- DependencyPropertyHelper.cs
- ConfigurationSectionCollection.cs
- Recipient.cs
- NameValueSectionHandler.cs
- DPTypeDescriptorContext.cs
- milexports.cs
- HttpRuntimeSection.cs
- TextTreeUndo.cs
- ProgressBar.cs
- IndependentlyAnimatedPropertyMetadata.cs
- WebBrowserBase.cs
- CollectionDataContractAttribute.cs
- RightsManagementPermission.cs
- PKCS1MaskGenerationMethod.cs
- SpecialTypeDataContract.cs
- ArgumentNullException.cs
- WebControlToolBoxItem.cs
- DataRow.cs
- BinaryEditor.cs
- OleAutBinder.cs
- UniqueConstraint.cs
- SqlNodeAnnotation.cs
- AppearanceEditorPart.cs
- ExpressionBindingCollection.cs
- ModuleBuilder.cs
- PerfCounterSection.cs
- InkCanvasSelection.cs
- OdbcConnectionFactory.cs
- DelimitedListTraceListener.cs
- SortDescriptionCollection.cs
- TableProviderWrapper.cs
- MissingManifestResourceException.cs
- ReadingWritingEntityEventArgs.cs
- RubberbandSelector.cs
- SecurityKeyIdentifierClause.cs
- DefaultParameterValueAttribute.cs
- ConnectionPoint.cs
- CssClassPropertyAttribute.cs
- HMACSHA1.cs
- SHA512Managed.cs
- ContextBase.cs
- LinearQuaternionKeyFrame.cs
- AccessText.cs
- PageParserFilter.cs
- SerializationAttributes.cs
- HttpPostProtocolImporter.cs
- MenuItemBinding.cs
- XD.cs
- MasterPage.cs
- DecoderReplacementFallback.cs
- Variable.cs
- InvalidDataContractException.cs
- DesignerTextViewAdapter.cs
- ObjectQueryProvider.cs
- MarkupProperty.cs
- Set.cs
- TypeGeneratedEventArgs.cs
- CompositionTarget.cs
- TcpClientCredentialType.cs
- DataGridViewComponentPropertyGridSite.cs
- XmlLoader.cs
- Focus.cs
- WindowsFont.cs
- ImageIndexConverter.cs
- ItemContainerGenerator.cs
- COM2PropertyPageUITypeConverter.cs
- BitmapDownload.cs
- PanelStyle.cs
- Opcode.cs
- ExeConfigurationFileMap.cs