Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Web / System / Web / Services / Protocols / HttpPostLocalhostServerProtocol.cs / 1305376 / HttpPostLocalhostServerProtocol.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Services.Protocols { using System.Net; internal class HttpPostLocalhostServerProtocolFactory : ServerProtocolFactory { protected override ServerProtocol CreateIfRequestCompatible(HttpRequest request){ if (request.PathInfo.Length < 2) return null; if (request.HttpMethod != "POST") // MethodNotAllowed = 405, return new UnsupportedRequestProtocol(405); bool isLocal = request.Url.IsLoopback || request.IsLocal; if (!isLocal) return null; return new HttpPostServerProtocol(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Services.Protocols { using System.Net; internal class HttpPostLocalhostServerProtocolFactory : ServerProtocolFactory { protected override ServerProtocol CreateIfRequestCompatible(HttpRequest request){ if (request.PathInfo.Length < 2) return null; if (request.HttpMethod != "POST") // MethodNotAllowed = 405, return new UnsupportedRequestProtocol(405); bool isLocal = request.Url.IsLoopback || request.IsLocal; if (!isLocal) return null; return new HttpPostServerProtocol(); } } } // 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
- StreamUpdate.cs
- SafeHandles.cs
- Thumb.cs
- RtfNavigator.cs
- KeyGestureConverter.cs
- MemberAssignment.cs
- ThreadAttributes.cs
- SqlHelper.cs
- BigInt.cs
- SessionEndingCancelEventArgs.cs
- SequentialUshortCollection.cs
- Color.cs
- ToolZone.cs
- ReliabilityContractAttribute.cs
- SHA256.cs
- EntityContainerEmitter.cs
- TripleDESCryptoServiceProvider.cs
- ObjectSecurity.cs
- ChannelToken.cs
- XXXOnTypeBuilderInstantiation.cs
- NumberSubstitution.cs
- ClassImporter.cs
- DataGridViewCellStyleConverter.cs
- Compensate.cs
- SqlDataAdapter.cs
- InheritanceContextChangedEventManager.cs
- Activation.cs
- DLinqTableProvider.cs
- StoreContentChangedEventArgs.cs
- ArrayList.cs
- Activity.cs
- FontWeightConverter.cs
- StringWriter.cs
- IIS7WorkerRequest.cs
- PermissionAttributes.cs
- WebPartHelpVerb.cs
- XmlSchemaCollection.cs
- CodeThrowExceptionStatement.cs
- MultiViewDesigner.cs
- LabelLiteral.cs
- SetterBaseCollection.cs
- DictionarySectionHandler.cs
- ManagedIStream.cs
- DivideByZeroException.cs
- ConnectionOrientedTransportChannelListener.cs
- UnknownBitmapEncoder.cs
- Byte.cs
- CachingParameterInspector.cs
- HandlerFactoryCache.cs
- Application.cs
- PopupControlService.cs
- IdentityNotMappedException.cs
- Subtree.cs
- Terminate.cs
- SemanticBasicElement.cs
- RijndaelCryptoServiceProvider.cs
- Sql8ConformanceChecker.cs
- ClientScriptManagerWrapper.cs
- DependencyObject.cs
- WeakReferenceEnumerator.cs
- ComplusEndpointConfigContainer.cs
- OracleException.cs
- LayoutEngine.cs
- SourceFilter.cs
- ConfigViewGenerator.cs
- UdpTransportBindingElement.cs
- DataGridViewControlCollection.cs
- XsdDataContractImporter.cs
- TextContainerChangedEventArgs.cs
- MsmqIntegrationInputChannel.cs
- InternalConfigEventArgs.cs
- FileLevelControlBuilderAttribute.cs
- ImageSourceConverter.cs
- TransactionScope.cs
- EventSetterHandlerConverter.cs
- ExpressionTable.cs
- DockPanel.cs
- SubpageParagraph.cs
- ActivityTypeResolver.xaml.cs
- XsdValidatingReader.cs
- ASCIIEncoding.cs
- WebConfigurationHost.cs
- AutoResizedEvent.cs
- PeerNameResolver.cs
- Membership.cs
- ToolStripArrowRenderEventArgs.cs
- WrapperEqualityComparer.cs
- ReflectionUtil.cs
- PropertyTabAttribute.cs
- SerializationHelper.cs
- RadioButtonAutomationPeer.cs
- UIElement.cs
- BitmapDownload.cs
- UInt64Converter.cs
- Int16Converter.cs
- DataFieldConverter.cs
- SiteMapSection.cs
- DesignerRegion.cs
- Dump.cs
- DateTimePicker.cs