Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. //------------------------------------------------------------------------------ //[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
- StreamGeometryContext.cs
- DataRecordInternal.cs
- SafeNativeMethods.cs
- OdbcTransaction.cs
- Control.cs
- DBCommand.cs
- SizeIndependentAnimationStorage.cs
- CqlErrorHelper.cs
- AppendHelper.cs
- DocumentViewerBase.cs
- PeerObject.cs
- WhitespaceSignificantCollectionAttribute.cs
- ManipulationDeltaEventArgs.cs
- ClickablePoint.cs
- Main.cs
- CompositeFontParser.cs
- ServiceOperationDetailViewControl.cs
- MetabaseSettingsIis7.cs
- QuaternionAnimation.cs
- TypeUsage.cs
- PageClientProxyGenerator.cs
- XhtmlBasicPhoneCallAdapter.cs
- DefaultPropertyAttribute.cs
- FontFamilyConverter.cs
- TrustLevel.cs
- PerformanceCounterLib.cs
- SynchronizedReadOnlyCollection.cs
- RemoteWebConfigurationHostServer.cs
- DataGridTextBoxColumn.cs
- Boolean.cs
- VisualProxy.cs
- SoapObjectReader.cs
- _NegotiateClient.cs
- Effect.cs
- QilFactory.cs
- ArglessEventHandlerProxy.cs
- WSDualHttpSecurityMode.cs
- DataGridPagerStyle.cs
- VirtualizedItemProviderWrapper.cs
- XmlUTF8TextReader.cs
- serverconfig.cs
- CompilerGeneratedAttribute.cs
- EntityUtil.cs
- StructuredProperty.cs
- EpmContentDeSerializerBase.cs
- TraceSection.cs
- ListViewItem.cs
- ChineseLunisolarCalendar.cs
- UIElementAutomationPeer.cs
- Splitter.cs
- ResourcePermissionBaseEntry.cs
- Int64Storage.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ResXDataNode.cs
- ObjectNavigationPropertyMapping.cs
- SizeLimitedCache.cs
- CodePrimitiveExpression.cs
- RegularExpressionValidator.cs
- DataGridTableCollection.cs
- GenericTypeParameterBuilder.cs
- ExitEventArgs.cs
- WebBrowserNavigatingEventHandler.cs
- Native.cs
- CharacterString.cs
- Group.cs
- ViewStateException.cs
- XmlAtomicValue.cs
- TypeHelper.cs
- UrlAuthFailedErrorFormatter.cs
- StructuredProperty.cs
- SqlDataSourceCache.cs
- SqlWorkflowInstanceStoreLock.cs
- FormViewCommandEventArgs.cs
- ApplicationContext.cs
- CodeDOMProvider.cs
- WebPartUserCapability.cs
- XmlLoader.cs
- WebControl.cs
- Baml2006SchemaContext.cs
- WebPartConnectionCollection.cs
- InfoCardBaseException.cs
- SchemaLookupTable.cs
- AlternateViewCollection.cs
- ISSmlParser.cs
- BaseValidatorDesigner.cs
- ComponentChangingEvent.cs
- MD5.cs
- CacheDependency.cs
- Relationship.cs
- BinaryParser.cs
- SerializableTypeCodeDomSerializer.cs
- Profiler.cs
- MessageCredentialType.cs
- WebBrowserHelper.cs
- DeflateStream.cs
- ErrorTableItemStyle.cs
- DelegateSerializationHolder.cs
- HandlerBase.cs
- DocumentViewerBase.cs
- MarkupExtensionReturnTypeAttribute.cs