Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / ApplicationServiceManager.cs / 1305376 / ApplicationServiceManager.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI {
using System;
using System.Web.UI;
using System.Web.Resources;
using System.Globalization;
internal static class ApplicationServiceManager {
public const int StringBuilderCapacity = 128;
public static string MergeServiceUrls(string serviceUrl, string existingUrl, Control urlBase) {
serviceUrl = serviceUrl.Trim();
if(serviceUrl.Length > 0) {
serviceUrl = urlBase.ResolveClientUrl(serviceUrl);
if(String.IsNullOrEmpty(existingUrl)) {
// proxy has specified a url and we don't have one yet, so use it
existingUrl = serviceUrl;
}
else {
// proxy has specified a url but we arleady have a url either from ScriptManager itself or a previous proxy.
// The urls must agree or an exception is thrown.
if(!string.Equals(serviceUrl, existingUrl, StringComparison.OrdinalIgnoreCase)) {
throw new ArgumentException(AtlasWeb.AppService_MultiplePaths);
}
}
}
return existingUrl;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI {
using System;
using System.Web.UI;
using System.Web.Resources;
using System.Globalization;
internal static class ApplicationServiceManager {
public const int StringBuilderCapacity = 128;
public static string MergeServiceUrls(string serviceUrl, string existingUrl, Control urlBase) {
serviceUrl = serviceUrl.Trim();
if(serviceUrl.Length > 0) {
serviceUrl = urlBase.ResolveClientUrl(serviceUrl);
if(String.IsNullOrEmpty(existingUrl)) {
// proxy has specified a url and we don't have one yet, so use it
existingUrl = serviceUrl;
}
else {
// proxy has specified a url but we arleady have a url either from ScriptManager itself or a previous proxy.
// The urls must agree or an exception is thrown.
if(!string.Equals(serviceUrl, existingUrl, StringComparison.OrdinalIgnoreCase)) {
throw new ArgumentException(AtlasWeb.AppService_MultiplePaths);
}
}
}
return existingUrl;
}
}
}
// 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
- IOThreadTimer.cs
- SqlRemoveConstantOrderBy.cs
- WindowsComboBox.cs
- WebSysDisplayNameAttribute.cs
- Reference.cs
- XmlExceptionHelper.cs
- SynchronizedDispatch.cs
- ArrayEditor.cs
- TrackingServices.cs
- input.cs
- WebPartCloseVerb.cs
- SafeSecurityHelper.cs
- CategoryNameCollection.cs
- ToolZone.cs
- TreeBuilderXamlTranslator.cs
- AutomationPatternInfo.cs
- LineMetrics.cs
- MinMaxParagraphWidth.cs
- GlyphingCache.cs
- Pair.cs
- ObjectSet.cs
- ProfilePropertySettings.cs
- ImportCatalogPart.cs
- XmlSchema.cs
- safex509handles.cs
- DatatypeImplementation.cs
- RegexCode.cs
- odbcmetadatafactory.cs
- MachineKeyConverter.cs
- UnsafeNativeMethods.cs
- RegistryKey.cs
- SamlAssertion.cs
- WpfKnownType.cs
- CorrelationManager.cs
- QuestionEventArgs.cs
- ButtonFlatAdapter.cs
- XmlTextAttribute.cs
- ADMembershipProvider.cs
- BitmapEffect.cs
- SetterTriggerConditionValueConverter.cs
- MouseGestureConverter.cs
- RTLAwareMessageBox.cs
- HtmlInputFile.cs
- ToolStripLabel.cs
- ColumnHeaderCollectionEditor.cs
- ToolTipService.cs
- KeySpline.cs
- UseManagedPresentationBindingElement.cs
- Validator.cs
- Transform.cs
- ScriptingWebServicesSectionGroup.cs
- SyntaxCheck.cs
- ScriptResourceInfo.cs
- HostVisual.cs
- TemplateXamlParser.cs
- TimerElapsedEvenArgs.cs
- SchemaTableColumn.cs
- InteropAutomationProvider.cs
- FormCollection.cs
- XPathPatternBuilder.cs
- input.cs
- CryptoProvider.cs
- ItemAutomationPeer.cs
- DrawingContext.cs
- propertytag.cs
- GridViewEditEventArgs.cs
- RepeatButtonAutomationPeer.cs
- MethodBuilderInstantiation.cs
- SqlSelectStatement.cs
- GenericRootAutomationPeer.cs
- ChildrenQuery.cs
- WorkflowEnvironment.cs
- CryptoHandle.cs
- DateRangeEvent.cs
- AppDomainResourcePerfCounters.cs
- RenderingEventArgs.cs
- CustomSignedXml.cs
- AssemblyAttributes.cs
- WebBrowserDocumentCompletedEventHandler.cs
- FileFormatException.cs
- TextServicesContext.cs
- SqlSelectStatement.cs
- SrgsDocument.cs
- UpdatePanelTriggerCollection.cs
- Vector3DConverter.cs
- XmlIterators.cs
- ResourceReferenceExpressionConverter.cs
- PolygonHotSpot.cs
- MessageSecurityTokenVersion.cs
- NonBatchDirectoryCompiler.cs
- XhtmlConformanceSection.cs
- ListViewEditEventArgs.cs
- GridItemCollection.cs
- ExpressionTextBox.xaml.cs
- DataViewListener.cs
- FlowLayoutSettings.cs
- PeerNameResolver.cs
- Win32MouseDevice.cs
- TabControl.cs
- SQLBytesStorage.cs