Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / WebScriptServiceHost.cs / 1305376 / WebScriptServiceHost.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System.IO; using System.Collections.Generic; using System.ServiceModel.Description; using System.Diagnostics.CodeAnalysis; using System.Configuration; using System.ServiceModel.Web; using System.Net; using System.ServiceModel.Channels; class WebScriptServiceHost : ServiceHost { static readonly string WebScriptEndpointKind = "webScriptEndpoint"; public WebScriptServiceHost(Type serviceType, params Uri[] baseAddresses) : base(serviceType, baseAddresses) { } protected override void OnOpening() { WebServiceHost.AddAutomaticWebHttpBindingEndpoints(this, this.ImplementedContracts, SR2.GetString(SR2.JsonWebScriptServiceHostOneServiceContract, this.ImplementedContracts.Count), WebScriptEndpointKind); foreach (ServiceEndpoint endpoint in this.Description.Endpoints) { if (endpoint.Binding != null && endpoint.Binding.CreateBindingElements().Find() != null) { if (endpoint.Behaviors.Find () == null) { ConfigLoader.LoadDefaultEndpointBehaviors(endpoint); if (endpoint.Behaviors.Find () == null) { endpoint.Behaviors.Add(new WebScriptEnablingBehavior()); } } } } base.OnOpening(); } } } // 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
- sqlcontext.cs
- WebPartEditVerb.cs
- ISO2022Encoding.cs
- AlphabetConverter.cs
- XmlSchemaValidator.cs
- FactoryGenerator.cs
- RewritingPass.cs
- PrefixHandle.cs
- ResourceExpressionBuilder.cs
- TextSelectionHelper.cs
- _NegotiateClient.cs
- VerticalAlignConverter.cs
- AlgoModule.cs
- MimeFormatExtensions.cs
- HttpModuleActionCollection.cs
- XmlSerializerFaultFormatter.cs
- ControlPaint.cs
- ContentFileHelper.cs
- ObjectItemLoadingSessionData.cs
- CaretElement.cs
- CubicEase.cs
- ReadWriteObjectLock.cs
- COM2PropertyDescriptor.cs
- BuilderElements.cs
- ProxyGenerationError.cs
- IFlowDocumentViewer.cs
- XPathAncestorQuery.cs
- DataViewSetting.cs
- ExceptionAggregator.cs
- FeatureSupport.cs
- BitmapMetadataEnumerator.cs
- IsolationInterop.cs
- SQLInt16.cs
- DeclaredTypeValidatorAttribute.cs
- CodeSubDirectoriesCollection.cs
- XmlWriterSettings.cs
- SqlCacheDependencySection.cs
- MultiSelectRootGridEntry.cs
- RegexRunner.cs
- XPathBuilder.cs
- XmlLanguageConverter.cs
- LinkArea.cs
- Propagator.Evaluator.cs
- _LazyAsyncResult.cs
- DataControlLinkButton.cs
- SqlDataReaderSmi.cs
- Converter.cs
- MobileControl.cs
- GradientStop.cs
- LineServicesRun.cs
- EncodingTable.cs
- PropertyTabChangedEvent.cs
- ProcessHostMapPath.cs
- MediaPlayerState.cs
- FlowDocumentView.cs
- validationstate.cs
- ServiceDefaults.cs
- DataGrid.cs
- PointHitTestResult.cs
- TriggerActionCollection.cs
- smtppermission.cs
- _DisconnectOverlappedAsyncResult.cs
- DataComponentNameHandler.cs
- MessageSecurityTokenVersion.cs
- AccessibilityHelperForVista.cs
- ValidationSummary.cs
- SessionPageStateSection.cs
- DataGridViewCellCancelEventArgs.cs
- ConfigurationConverterBase.cs
- BindingListCollectionView.cs
- BinaryEditor.cs
- WebPartDisplayModeCancelEventArgs.cs
- RectangleHotSpot.cs
- ComboBox.cs
- ImagingCache.cs
- TextServicesProperty.cs
- mansign.cs
- CryptoHandle.cs
- XmlAttributeCollection.cs
- WorkflowQueue.cs
- WorkflowOperationBehavior.cs
- BinarySecretKeyIdentifierClause.cs
- SystemIPv6InterfaceProperties.cs
- processwaithandle.cs
- CodeMethodMap.cs
- oledbmetadatacolumnnames.cs
- HttpCookiesSection.cs
- ScaleTransform.cs
- HttpCachePolicy.cs
- ArgIterator.cs
- DataServiceHostWrapper.cs
- Content.cs
- PerformanceCounterPermissionEntryCollection.cs
- InfoCardArgumentException.cs
- BaseTemplateParser.cs
- ISAPIRuntime.cs
- WSHttpTransportSecurityElement.cs
- XmlSchemaIdentityConstraint.cs
- TreeIterator.cs
- ContentFilePart.cs