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
- FileRecordSequenceCompletedAsyncResult.cs
- BitmapMetadata.cs
- TypeContext.cs
- LinkDescriptor.cs
- Random.cs
- WeakReferenceKey.cs
- Util.cs
- XPathNodeHelper.cs
- ManagedIStream.cs
- PlaceHolder.cs
- AssemblyInfo.cs
- SystemNetworkInterface.cs
- ObjectPersistData.cs
- BuiltInExpr.cs
- ListViewAutomationPeer.cs
- SchemaCollectionPreprocessor.cs
- SafeBitVector32.cs
- ViewManagerAttribute.cs
- ConfigurationLocationCollection.cs
- WebResponse.cs
- PenContext.cs
- QilScopedVisitor.cs
- SiteMapProvider.cs
- KeyGesture.cs
- ExpressionEditorSheet.cs
- ElementAction.cs
- ConnectionManagementElementCollection.cs
- MemberListBinding.cs
- XmlValidatingReader.cs
- UnicastIPAddressInformationCollection.cs
- SecurityTokenProvider.cs
- TextDpi.cs
- UriParserTemplates.cs
- ModifierKeysConverter.cs
- ConnectionManagementSection.cs
- CookielessData.cs
- TrustDriver.cs
- AssemblyHash.cs
- TableLayoutPanelCellPosition.cs
- SynchronizationFilter.cs
- TextParaLineResult.cs
- Wildcard.cs
- TransformedBitmap.cs
- SlotInfo.cs
- TraceSwitch.cs
- TransportChannelFactory.cs
- PolyBezierSegmentFigureLogic.cs
- BooleanAnimationBase.cs
- InternalControlCollection.cs
- UpdateManifestForBrowserApplication.cs
- OperationContractGenerationContext.cs
- StringWriter.cs
- ViewGenResults.cs
- _HelperAsyncResults.cs
- XmlLanguage.cs
- TextChange.cs
- SchemaHelper.cs
- relpropertyhelper.cs
- SchemaCollectionCompiler.cs
- ProcessThreadDesigner.cs
- SessionStateContainer.cs
- SigningCredentials.cs
- GridLength.cs
- TextEditorLists.cs
- MenuAdapter.cs
- VectorValueSerializer.cs
- SemanticBasicElement.cs
- ExtensionWindowResizeGrip.cs
- BinaryObjectReader.cs
- AsyncResult.cs
- EntityDataSourceView.cs
- SmtpSection.cs
- ProfessionalColorTable.cs
- DefaultTextStore.cs
- ObjectListFieldCollection.cs
- SecurityAppliedMessage.cs
- Permission.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- AuthenticationException.cs
- PathData.cs
- XmlSerializationWriter.cs
- ResourceProviderFactory.cs
- SessionPageStatePersister.cs
- StreamAsIStream.cs
- BooleanFacetDescriptionElement.cs
- RuntimeConfig.cs
- CompletedAsyncResult.cs
- CfgSemanticTag.cs
- PathGeometry.cs
- Collection.cs
- SHA256.cs
- ResourceDescriptionAttribute.cs
- LingerOption.cs
- InputLanguageProfileNotifySink.cs
- XmlCharCheckingReader.cs
- TextViewSelectionProcessor.cs
- Accessible.cs
- DoubleCollectionConverter.cs
- OrderByQueryOptionExpression.cs
- AutomationTextAttribute.cs