Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / Configuration / IISMapPath.cs / 1 / IISMapPath.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Configuration {
using System.Configuration;
using System.Collections;
using System.Globalization;
using System.Xml;
using System.Text;
using System.Web.Util;
using System.Web.UI;
using System.IO;
using System.Web.Hosting;
//
// Abstracts the difference between Metabase and SitesSection IConfigMapPath.
//
static internal class IISMapPath {
static internal IConfigMapPath GetInstance() {
// IIS 7 bits on <= IIS 6.x: use the metabase
if (ServerConfig.UseMetabase) {
return (IConfigMapPath) MetabaseServerConfig.GetInstance();
}
ProcessHost host = ProcessHost.DefaultHost;
IProcessHostSupportFunctions functions = null;
if (null != host) {
functions = host.SupportFunctions;
}
if (functions == null) {
functions = HostingEnvironment.SupportFunctions;
}
return new ProcessHostMapPath(functions);
}
// A site name might be an id if it is a number.
static internal bool IsSiteId(string siteName) {
if (string.IsNullOrEmpty(siteName))
return false;
for (int i = 0; i < siteName.Length; i++) {
if (!Char.IsDigit(siteName[i])) {
return false;
}
}
return true;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Configuration {
using System.Configuration;
using System.Collections;
using System.Globalization;
using System.Xml;
using System.Text;
using System.Web.Util;
using System.Web.UI;
using System.IO;
using System.Web.Hosting;
//
// Abstracts the difference between Metabase and SitesSection IConfigMapPath.
//
static internal class IISMapPath {
static internal IConfigMapPath GetInstance() {
// IIS 7 bits on <= IIS 6.x: use the metabase
if (ServerConfig.UseMetabase) {
return (IConfigMapPath) MetabaseServerConfig.GetInstance();
}
ProcessHost host = ProcessHost.DefaultHost;
IProcessHostSupportFunctions functions = null;
if (null != host) {
functions = host.SupportFunctions;
}
if (functions == null) {
functions = HostingEnvironment.SupportFunctions;
}
return new ProcessHostMapPath(functions);
}
// A site name might be an id if it is a number.
static internal bool IsSiteId(string siteName) {
if (string.IsNullOrEmpty(siteName))
return false;
for (int i = 0; i < siteName.Length; i++) {
if (!Char.IsDigit(siteName[i])) {
return false;
}
}
return true;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ActivityBindForm.Designer.cs
- ButtonChrome.cs
- LinkLabel.cs
- HttpModulesSection.cs
- WindowsListView.cs
- PartialTrustHelpers.cs
- Scene3D.cs
- Error.cs
- Pkcs7Recipient.cs
- FilterQuery.cs
- SupportsEventValidationAttribute.cs
- PointF.cs
- ProxyOperationRuntime.cs
- ExtendedPropertyCollection.cs
- SortedDictionary.cs
- ImageInfo.cs
- MaterialGroup.cs
- HTTPRemotingHandler.cs
- Line.cs
- COM2PropertyBuilderUITypeEditor.cs
- SerializableAttribute.cs
- Point3DCollection.cs
- BindToObject.cs
- FontWeights.cs
- Font.cs
- MetabaseServerConfig.cs
- CollectionViewProxy.cs
- PermissionListSet.cs
- UdpRetransmissionSettings.cs
- InputLangChangeEvent.cs
- ManualResetEvent.cs
- PropertySegmentSerializationProvider.cs
- ReceiveSecurityHeaderElementManager.cs
- NativeMethods.cs
- SecurityException.cs
- IERequestCache.cs
- DataGridViewCellValidatingEventArgs.cs
- ProxyElement.cs
- Brush.cs
- SplineKeyFrames.cs
- UnsafeNativeMethods.cs
- MonthCalendar.cs
- GroupDescription.cs
- EncryptedReference.cs
- ExtendedPropertyInfo.cs
- ImageFormat.cs
- GenericPrincipal.cs
- OutputCacheSettingsSection.cs
- SendActivityDesigner.cs
- CompilerScope.Storage.cs
- DependencyObjectPropertyDescriptor.cs
- Reference.cs
- UIElement.cs
- URLAttribute.cs
- ScrollBar.cs
- NotImplementedException.cs
- WebRequestModulesSection.cs
- DesignerActionVerbItem.cs
- ConstructorBuilder.cs
- SecurityContext.cs
- DocumentReferenceCollection.cs
- DelayLoadType.cs
- FixedFlowMap.cs
- PagePropertiesChangingEventArgs.cs
- DocumentReferenceCollection.cs
- EpmSyndicationContentDeSerializer.cs
- MediaElementAutomationPeer.cs
- CompositeActivityTypeDescriptor.cs
- MetadataUtilsSmi.cs
- KoreanCalendar.cs
- Evaluator.cs
- LinearKeyFrames.cs
- FixedDSBuilder.cs
- FramingEncoders.cs
- Comparer.cs
- COM2ColorConverter.cs
- FreezableOperations.cs
- SizeAnimationUsingKeyFrames.cs
- ToolStripDropDownDesigner.cs
- DataGridViewCellCollection.cs
- _AutoWebProxyScriptHelper.cs
- BamlVersionHeader.cs
- ToolBarOverflowPanel.cs
- GenericEnumConverter.cs
- WebPartConnectionsDisconnectVerb.cs
- KeyToListMap.cs
- ComponentCollection.cs
- NameValueFileSectionHandler.cs
- _ListenerRequestStream.cs
- AmbientValueAttribute.cs
- versioninfo.cs
- RealizedColumnsBlock.cs
- ControlBuilderAttribute.cs
- HitTestParameters.cs
- XmlAnyElementAttribute.cs
- cookiecollection.cs
- TextEditorContextMenu.cs
- ServiceAuthorizationElement.cs
- NamespaceExpr.cs
- DesignerTransaction.cs