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
- AmbientLight.cs
- XAMLParseException.cs
- XmlExpressionDumper.cs
- CqlErrorHelper.cs
- StreamGeometry.cs
- ComponentRenameEvent.cs
- TextDecoration.cs
- AsyncCompletedEventArgs.cs
- COAUTHIDENTITY.cs
- StylusPointPropertyId.cs
- ResourceIDHelper.cs
- AdRotator.cs
- BitmapFrame.cs
- TemplateLookupAction.cs
- XamlSerializerUtil.cs
- TreePrinter.cs
- SqlUtils.cs
- TimelineCollection.cs
- CacheDependency.cs
- StylusShape.cs
- BamlResourceSerializer.cs
- SqlWebEventProvider.cs
- DataTableNameHandler.cs
- HwndKeyboardInputProvider.cs
- IfAction.cs
- DesignerSerializationOptionsAttribute.cs
- X509Chain.cs
- IIS7WorkerRequest.cs
- DbParameterCollectionHelper.cs
- MissingSatelliteAssemblyException.cs
- FixedSOMPageConstructor.cs
- DuplicateMessageDetector.cs
- SymmetricCryptoHandle.cs
- KeyInstance.cs
- NodeFunctions.cs
- DefaultAuthorizationContext.cs
- AstTree.cs
- XmlDigitalSignatureProcessor.cs
- EventDrivenDesigner.cs
- SqlTypesSchemaImporter.cs
- mansign.cs
- Validator.cs
- TextureBrush.cs
- CodeSnippetCompileUnit.cs
- ColumnReorderedEventArgs.cs
- DiagnosticTrace.cs
- StorageModelBuildProvider.cs
- CngAlgorithmGroup.cs
- DeflateEmulationStream.cs
- PathGeometry.cs
- ClientConfigurationSystem.cs
- ClientSponsor.cs
- HttpHeaderCollection.cs
- BufferedWebEventProvider.cs
- xmlNames.cs
- TransactionCache.cs
- BaseAutoFormat.cs
- ProfessionalColors.cs
- Pair.cs
- ProcessProtocolHandler.cs
- DecimalStorage.cs
- ProviderUtil.cs
- DataGridViewAdvancedBorderStyle.cs
- SqlTriggerAttribute.cs
- OpenFileDialog.cs
- MachineKeySection.cs
- FormsAuthenticationUser.cs
- BeginStoryboard.cs
- ReturnValue.cs
- glyphs.cs
- UshortList2.cs
- BinaryReader.cs
- PreservationFileReader.cs
- BreakRecordTable.cs
- WebPartZone.cs
- OleDbDataAdapter.cs
- WindowsScrollBarBits.cs
- Native.cs
- EncodingTable.cs
- ObjectIDGenerator.cs
- RegexStringValidatorAttribute.cs
- EndpointDiscoveryMetadata11.cs
- SrgsSubset.cs
- NewItemsContextMenuStrip.cs
- Geometry3D.cs
- SRDisplayNameAttribute.cs
- SequenceFullException.cs
- ProfileEventArgs.cs
- StorageEndPropertyMapping.cs
- LicenseContext.cs
- WebPartConnection.cs
- InfoCardSymmetricCrypto.cs
- DPTypeDescriptorContext.cs
- SplitterEvent.cs
- XamlTreeBuilderBamlRecordWriter.cs
- SByteConverter.cs
- BitmapImage.cs
- ManagementScope.cs
- PaintEvent.cs
- QilStrConcat.cs