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
- __TransparentProxy.cs
- Ipv6Element.cs
- SeekStoryboard.cs
- LineGeometry.cs
- indexingfiltermarshaler.cs
- ListenerConnectionModeReader.cs
- SchemaImporterExtension.cs
- DataRecordInternal.cs
- PeekCompletedEventArgs.cs
- GenerateScriptTypeAttribute.cs
- figurelengthconverter.cs
- ItemCollection.cs
- _RequestCacheProtocol.cs
- FilterableAttribute.cs
- RuntimeVariableList.cs
- EnumBuilder.cs
- SamlAssertion.cs
- ProcessModelInfo.cs
- FormViewInsertEventArgs.cs
- DataSourceView.cs
- SynchronizationLockException.cs
- ReadOnlyDataSource.cs
- BrowserTree.cs
- RegexCaptureCollection.cs
- DataServiceExpressionVisitor.cs
- Latin1Encoding.cs
- CopyOfAction.cs
- DataContractSerializerOperationBehavior.cs
- ExternalFile.cs
- WindowsListViewSubItem.cs
- AsyncPostBackErrorEventArgs.cs
- TraceUtils.cs
- AssemblyHash.cs
- DataKey.cs
- UmAlQuraCalendar.cs
- SHA256Managed.cs
- ArrayWithOffset.cs
- KnownBoxes.cs
- ObjectDataSourceSelectingEventArgs.cs
- WebPartEditorOkVerb.cs
- CorrelationManager.cs
- BamlWriter.cs
- WindowsAuthenticationEventArgs.cs
- CapabilitiesUse.cs
- OdbcErrorCollection.cs
- Object.cs
- SystemResourceHost.cs
- CorrelationKeyCalculator.cs
- KnownTypesHelper.cs
- ResourcesGenerator.cs
- AttributeQuery.cs
- WebPart.cs
- SegmentInfo.cs
- PropertyToken.cs
- LineMetrics.cs
- DecoderFallbackWithFailureFlag.cs
- TranslateTransform3D.cs
- DBBindings.cs
- baseaxisquery.cs
- ContextMenuStripGroupCollection.cs
- LogicalExpressionEditor.cs
- SystemIPGlobalStatistics.cs
- DayRenderEvent.cs
- CompositeCollectionView.cs
- ToolStripSettings.cs
- TdsParser.cs
- MainMenu.cs
- As.cs
- SynchronizedDispatch.cs
- PTProvider.cs
- SymbolEqualComparer.cs
- CodeStatement.cs
- CustomValidator.cs
- documentation.cs
- DesignTable.cs
- DataContractSerializerElement.cs
- AsyncResult.cs
- SafeCryptContextHandle.cs
- DataTableReader.cs
- PointHitTestParameters.cs
- InputLanguageProfileNotifySink.cs
- TypeDescriptor.cs
- ControlUtil.cs
- Base64Decoder.cs
- DesignerSerializerAttribute.cs
- RSAPKCS1KeyExchangeFormatter.cs
- OletxDependentTransaction.cs
- SelectionEditingBehavior.cs
- RichTextBox.cs
- XmlSchemaDatatype.cs
- PropertyAccessVisitor.cs
- VectorKeyFrameCollection.cs
- TdsParameterSetter.cs
- TagPrefixAttribute.cs
- RelatedView.cs
- CredentialCache.cs
- MetabaseSettings.cs
- ErrorsHelper.cs
- Int16.cs
- Menu.cs