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
- TreeViewImageIndexConverter.cs
- HistoryEventArgs.cs
- UrlAuthorizationModule.cs
- DeferrableContent.cs
- OrderedDictionary.cs
- Attributes.cs
- MatrixCamera.cs
- ImageDrawing.cs
- Thickness.cs
- AttachedProperty.cs
- AdvancedBindingPropertyDescriptor.cs
- Style.cs
- ContainerUIElement3D.cs
- CatalogZone.cs
- MenuItem.cs
- StyleBamlRecordReader.cs
- XmlSchema.cs
- PathFigureCollection.cs
- MultiView.cs
- Stroke2.cs
- ContainerParaClient.cs
- NamespaceInfo.cs
- DrawingGroup.cs
- EventLevel.cs
- Monitor.cs
- ListenerElementsCollection.cs
- JsonReaderDelegator.cs
- METAHEADER.cs
- FileEnumerator.cs
- TreeNodeEventArgs.cs
- CodeComment.cs
- FileEnumerator.cs
- BitmapSizeOptions.cs
- ObjectDataSourceSelectingEventArgs.cs
- ToolStripContainer.cs
- ProcessHostConfigUtils.cs
- TailCallAnalyzer.cs
- Int16AnimationBase.cs
- DataExchangeServiceBinder.cs
- XmlCollation.cs
- GraphicsContext.cs
- Preprocessor.cs
- Resources.Designer.cs
- XmlWriter.cs
- HealthMonitoringSection.cs
- XPathAncestorQuery.cs
- DoubleAnimationUsingPath.cs
- XmlResolver.cs
- LessThanOrEqual.cs
- DrawingBrush.cs
- PointIndependentAnimationStorage.cs
- StringHelper.cs
- EnumValAlphaComparer.cs
- ChangePasswordAutoFormat.cs
- VisualStyleRenderer.cs
- TimeManager.cs
- AxHost.cs
- CodeNamespaceImportCollection.cs
- CompiledRegexRunnerFactory.cs
- ProfileManager.cs
- TemplatedMailWebEventProvider.cs
- TypedTableHandler.cs
- TranslateTransform.cs
- WindowsTreeView.cs
- _UriTypeConverter.cs
- RuntimeConfigurationRecord.cs
- WebPartTransformerCollection.cs
- ping.cs
- IndependentlyAnimatedPropertyMetadata.cs
- FunctionQuery.cs
- CompModSwitches.cs
- RuleSetReference.cs
- CodeExpressionCollection.cs
- PartitionedDataSource.cs
- SingleStorage.cs
- SafeLocalAllocation.cs
- LambdaCompiler.Address.cs
- ObjectToken.cs
- SessionEndedEventArgs.cs
- Vector3D.cs
- ListBox.cs
- ListViewCommandEventArgs.cs
- Block.cs
- ExceptionUtil.cs
- BaseTemplateParser.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- MemberAccessException.cs
- ComponentEditorPage.cs
- ObjectPropertyMapping.cs
- CustomErrorCollection.cs
- PageEventArgs.cs
- SynchronizationLockException.cs
- ListDataBindEventArgs.cs
- DataSourceGeneratorException.cs
- PostBackOptions.cs
- UIElementParaClient.cs
- SmtpTransport.cs
- DBDataPermissionAttribute.cs
- Site.cs
- XmlWrappingReader.cs