Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- PageOrientation.cs
- HwndTarget.cs
- RoleManagerModule.cs
- ArgumentFixer.cs
- RealProxy.cs
- _FtpControlStream.cs
- ThicknessConverter.cs
- FixedSOMTextRun.cs
- WebPartAuthorizationEventArgs.cs
- DecoderFallback.cs
- EditorZoneDesigner.cs
- DrawingBrush.cs
- X509ClientCertificateAuthenticationElement.cs
- DifferencingCollection.cs
- NameObjectCollectionBase.cs
- DefaultParameterValueAttribute.cs
- CommandExpr.cs
- XmlTextAttribute.cs
- FutureFactory.cs
- CodeDirectiveCollection.cs
- HandlerWithFactory.cs
- DataGridPreparingCellForEditEventArgs.cs
- DataGridTextBox.cs
- ManipulationInertiaStartingEventArgs.cs
- OleServicesContext.cs
- ProfileProvider.cs
- HtmlInputControl.cs
- TabPanel.cs
- Screen.cs
- WebBrowserUriTypeConverter.cs
- Viewport3DAutomationPeer.cs
- CompositeDesignerAccessibleObject.cs
- PersonalizationStateInfoCollection.cs
- ScriptControlDescriptor.cs
- PrivilegedConfigurationManager.cs
- StickyNote.cs
- Byte.cs
- DataAdapter.cs
- TextSpanModifier.cs
- ModelPerspective.cs
- TraversalRequest.cs
- Pkcs7Recipient.cs
- CommandHelper.cs
- WindowsFormsHostAutomationPeer.cs
- XmlSchemaComplexType.cs
- DLinqColumnProvider.cs
- ObjectListField.cs
- PerformanceCounter.cs
- ExpressionConverter.cs
- COM2EnumConverter.cs
- MimeTextImporter.cs
- Lease.cs
- RtType.cs
- RuleProcessor.cs
- EventsTab.cs
- PropertyManager.cs
- isolationinterop.cs
- HttpCookie.cs
- SerializerWriterEventHandlers.cs
- ComponentChangedEvent.cs
- GridToolTip.cs
- ProviderException.cs
- DecimalConverter.cs
- BinaryParser.cs
- SnapshotChangeTrackingStrategy.cs
- RepeatButtonAutomationPeer.cs
- BitmapSource.cs
- Transform.cs
- StreamInfo.cs
- DataSourceView.cs
- ImageSource.cs
- ListViewGroupCollectionEditor.cs
- ManagementScope.cs
- PrePostDescendentsWalker.cs
- RuleDefinitions.cs
- TextAutomationPeer.cs
- PageVisual.cs
- WebBrowserDesigner.cs
- TCEAdapterGenerator.cs
- SizeConverter.cs
- EdmProviderManifest.cs
- TextureBrush.cs
- smtpconnection.cs
- VectorCollectionConverter.cs
- UIElementPropertyUndoUnit.cs
- ValidationErrorEventArgs.cs
- PhysicalAddress.cs
- WpfWebRequestHelper.cs
- ListViewEditEventArgs.cs
- BindingsCollection.cs
- IISMapPath.cs
- StatusBarAutomationPeer.cs
- BitmapEffect.cs
- SymLanguageType.cs
- GridViewCancelEditEventArgs.cs
- TypeGeneratedEventArgs.cs
- FrameworkTextComposition.cs
- MailBnfHelper.cs
- NavigationCommands.cs
- CmsUtils.cs