Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / System.ServiceModel.Activation / System / ServiceModel / Activation / AspNetRouteServiceHttpHandler.cs / 1305376 / AspNetRouteServiceHttpHandler.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Activation { using System.Runtime; using System.Security; using System.ServiceModel; using System.Web; using System.Web.SessionState; class AspNetRouteServiceHttpHandler : IHttpAsyncHandler, IRequiresSessionState { string serviceVirtualPath; public AspNetRouteServiceHttpHandler(string virtualPath) { this.serviceVirtualPath = virtualPath; } public bool IsReusable { [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - called outside PermitOnly context.")] get { return true; } } [Fx.Tag.SecurityNote(Critical = "Entry-point from asp.net, called outside PermitOnly context. ASP.NET calls are critical." + "ExecuteSynchronous is critical because it captures HostedImpersonationContext (and makes it available later) " + "so caller must ensure that this is called in the right place.")] [SecurityCritical] public void ProcessRequest(HttpContext context) { ServiceHostingEnvironment.SafeEnsureInitialized(); HostedHttpRequestAsyncResult.ExecuteSynchronous(context.ApplicationInstance, this.serviceVirtualPath, true, false); } [Fx.Tag.SecurityNote(Critical = "Entry-point from asp.net, called outside PermitOnly context. ASP.NET calls are critical." + "ExecuteSynchronous is critical because it captures HostedImpersonationContext (and makes it available later) " + "so caller must ensure that this is called in the right place.")] [SecurityCritical] public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback callback, object extraData) { ServiceHostingEnvironment.SafeEnsureInitialized(); return new HostedHttpRequestAsyncResult(context.ApplicationInstance, this.serviceVirtualPath, true, false, callback, extraData); } [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - called outside PermitOnly context.")] public void EndProcessRequest(IAsyncResult result) { HostedHttpRequestAsyncResult.End(result); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Activation { using System.Runtime; using System.Security; using System.ServiceModel; using System.Web; using System.Web.SessionState; class AspNetRouteServiceHttpHandler : IHttpAsyncHandler, IRequiresSessionState { string serviceVirtualPath; public AspNetRouteServiceHttpHandler(string virtualPath) { this.serviceVirtualPath = virtualPath; } public bool IsReusable { [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - called outside PermitOnly context.")] get { return true; } } [Fx.Tag.SecurityNote(Critical = "Entry-point from asp.net, called outside PermitOnly context. ASP.NET calls are critical." + "ExecuteSynchronous is critical because it captures HostedImpersonationContext (and makes it available later) " + "so caller must ensure that this is called in the right place.")] [SecurityCritical] public void ProcessRequest(HttpContext context) { ServiceHostingEnvironment.SafeEnsureInitialized(); HostedHttpRequestAsyncResult.ExecuteSynchronous(context.ApplicationInstance, this.serviceVirtualPath, true, false); } [Fx.Tag.SecurityNote(Critical = "Entry-point from asp.net, called outside PermitOnly context. ASP.NET calls are critical." + "ExecuteSynchronous is critical because it captures HostedImpersonationContext (and makes it available later) " + "so caller must ensure that this is called in the right place.")] [SecurityCritical] public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback callback, object extraData) { ServiceHostingEnvironment.SafeEnsureInitialized(); return new HostedHttpRequestAsyncResult(context.ApplicationInstance, this.serviceVirtualPath, true, false, callback, extraData); } [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - called outside PermitOnly context.")] public void EndProcessRequest(IAsyncResult result) { HostedHttpRequestAsyncResult.End(result); } } } // 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
- FrameAutomationPeer.cs
- OleServicesContext.cs
- RotateTransform.cs
- BamlRecordWriter.cs
- TextTreeUndoUnit.cs
- SpAudioStreamWrapper.cs
- BackStopAuthenticationModule.cs
- SystemIPInterfaceProperties.cs
- TreeViewCancelEvent.cs
- ServiceReference.cs
- Configuration.cs
- CompilerResults.cs
- WebScriptEndpoint.cs
- JavaScriptSerializer.cs
- RectConverter.cs
- assemblycache.cs
- GeneralTransform3DCollection.cs
- PageStatePersister.cs
- ForceCopyBuildProvider.cs
- ParameterReplacerVisitor.cs
- BindingExpressionUncommonField.cs
- ValidationSettings.cs
- ListComponentEditorPage.cs
- DBBindings.cs
- ScriptBehaviorDescriptor.cs
- NetworkInterface.cs
- StrokeNodeEnumerator.cs
- Binding.cs
- WorkflowPersistenceService.cs
- ResourceExpressionEditorSheet.cs
- PixelFormat.cs
- EventListener.cs
- OneOf.cs
- ElementNotEnabledException.cs
- ParserStack.cs
- HostSecurityManager.cs
- EFAssociationProvider.cs
- ReadingWritingEntityEventArgs.cs
- SymDocumentType.cs
- WebPartDisplayModeCollection.cs
- PropagatorResult.cs
- SoapReflectionImporter.cs
- ExpressionHelper.cs
- EventListener.cs
- WebPartUtil.cs
- SettingsContext.cs
- Parameter.cs
- ImageListDesigner.cs
- Geometry3D.cs
- COM2PropertyDescriptor.cs
- Typeface.cs
- WsatAdminException.cs
- SmiEventStream.cs
- BitmapFrameDecode.cs
- StdValidatorsAndConverters.cs
- SchemaTableOptionalColumn.cs
- TablePattern.cs
- XmlValidatingReaderImpl.cs
- ToolStripHighContrastRenderer.cs
- XmlSchemaSet.cs
- TrackBar.cs
- ChineseLunisolarCalendar.cs
- DocumentApplication.cs
- FontWeightConverter.cs
- _LoggingObject.cs
- IsolatedStorageFile.cs
- GridPattern.cs
- Html32TextWriter.cs
- MenuStrip.cs
- PasswordTextContainer.cs
- XmlDataLoader.cs
- JournalEntryListConverter.cs
- SafeWaitHandle.cs
- TerminatorSinks.cs
- X509SubjectKeyIdentifierClause.cs
- ActivityCodeGenerator.cs
- EmbossBitmapEffect.cs
- DockProviderWrapper.cs
- invalidudtexception.cs
- DataGridViewColumnEventArgs.cs
- DataRow.cs
- HttpClientCertificate.cs
- TargetInvocationException.cs
- DBCommand.cs
- DnsPermission.cs
- BaseProcessor.cs
- DiagnosticsConfigurationHandler.cs
- _Win32.cs
- CustomAttribute.cs
- PopupControlService.cs
- KeyNotFoundException.cs
- LogPolicy.cs
- ListViewGroupConverter.cs
- ISAPIApplicationHost.cs
- OdbcCommand.cs
- DescendantOverDescendantQuery.cs
- SerializationHelper.cs
- Condition.cs
- ParserContext.cs
- StringFreezingAttribute.cs