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
- RenderTargetBitmap.cs
- OracleFactory.cs
- UInt64Converter.cs
- XsltOutput.cs
- StyleHelper.cs
- DataGridViewCell.cs
- CloudCollection.cs
- ObjectTokenCategory.cs
- RegisteredScript.cs
- SchemaElement.cs
- NativeMethods.cs
- ParallelEnumerable.cs
- XamlClipboardData.cs
- AggregatePushdown.cs
- Int32Rect.cs
- SignedXmlDebugLog.cs
- SoapAttributeOverrides.cs
- SecurityRuntime.cs
- PolicyManager.cs
- CustomSignedXml.cs
- ScriptingJsonSerializationSection.cs
- GestureRecognitionResult.cs
- XmlDocument.cs
- ControlValuePropertyAttribute.cs
- DataList.cs
- SmiSettersStream.cs
- ObjectIDGenerator.cs
- WizardPanel.cs
- TableItemPattern.cs
- PresentationAppDomainManager.cs
- TraceFilter.cs
- VirtualPath.cs
- LayoutEditorPart.cs
- CornerRadius.cs
- SafeHandle.cs
- ServiceNameElement.cs
- ClassicBorderDecorator.cs
- documentsequencetextcontainer.cs
- MethodBuilder.cs
- TemplateControlCodeDomTreeGenerator.cs
- ConversionValidationRule.cs
- SecurityDocument.cs
- MultipleViewProviderWrapper.cs
- XPathBinder.cs
- PasswordTextNavigator.cs
- MachineSettingsSection.cs
- SiteMapNodeCollection.cs
- DesignerForm.cs
- RightsManagementInformation.cs
- NavigationEventArgs.cs
- SingleObjectCollection.cs
- XPathNodeIterator.cs
- Maps.cs
- WindowsEditBox.cs
- RelationshipEndCollection.cs
- PerfService.cs
- TextOnlyOutput.cs
- ImageMetadata.cs
- NativeMethods.cs
- DataBoundControl.cs
- ViewUtilities.cs
- XmlArrayItemAttributes.cs
- ISO2022Encoding.cs
- PolyLineSegment.cs
- TableLayout.cs
- CustomCategoryAttribute.cs
- StaticSiteMapProvider.cs
- FileLoadException.cs
- XmlIgnoreAttribute.cs
- ContentElementAutomationPeer.cs
- FormatterConverter.cs
- ExpandableObjectConverter.cs
- graph.cs
- NativeMethods.cs
- smtppermission.cs
- CodeSnippetTypeMember.cs
- AppModelKnownContentFactory.cs
- D3DImage.cs
- BlobPersonalizationState.cs
- ProgressiveCrcCalculatingStream.cs
- ValidatedControlConverter.cs
- TextBoxDesigner.cs
- HwndMouseInputProvider.cs
- FlagsAttribute.cs
- InnerItemCollectionView.cs
- ReadOnlyObservableCollection.cs
- ApplicationBuildProvider.cs
- StorageTypeMapping.cs
- StorageAssociationSetMapping.cs
- CacheSection.cs
- EntityCommandDefinition.cs
- OperationContractGenerationContext.cs
- ObjectTokenCategory.cs
- SqlConnectionString.cs
- HttpRequestCacheValidator.cs
- Hash.cs
- Debug.cs
- SymbolType.cs
- PersonalizationEntry.cs
- XmlNodeReader.cs