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
- ViewLoader.cs
- CodeSnippetCompileUnit.cs
- DataGridColumnCollection.cs
- WebPartMovingEventArgs.cs
- RenderTargetBitmap.cs
- UnsafeMethods.cs
- MemberHolder.cs
- PropertyInfo.cs
- ColumnReorderedEventArgs.cs
- TraceInternal.cs
- ListControl.cs
- ConfigurationErrorsException.cs
- EnumUnknown.cs
- QueryRewriter.cs
- XmlBaseReader.cs
- Label.cs
- IsolatedStorageFilePermission.cs
- MulticastOption.cs
- ReflectEventDescriptor.cs
- NamespaceExpr.cs
- Hashtable.cs
- RoutedEvent.cs
- GreenMethods.cs
- DataGridTable.cs
- ParallelQuery.cs
- DictionaryCustomTypeDescriptor.cs
- ComboBox.cs
- AesCryptoServiceProvider.cs
- ProbeRequestResponseAsyncResult.cs
- MouseCaptureWithinProperty.cs
- Pkcs7Signer.cs
- ArglessEventHandlerProxy.cs
- XmlSchemaImporter.cs
- PassportIdentity.cs
- SizeAnimationUsingKeyFrames.cs
- FontCacheUtil.cs
- DataKeyPropertyAttribute.cs
- SiteIdentityPermission.cs
- FixedElement.cs
- HMACMD5.cs
- NominalTypeEliminator.cs
- GeneralTransform3DGroup.cs
- JoinTreeNode.cs
- CreateDataSourceDialog.cs
- WindowsFormsHostPropertyMap.cs
- COM2FontConverter.cs
- LogReserveAndAppendState.cs
- XmlDocumentFragment.cs
- ChannelTokenTypeConverter.cs
- WizardForm.cs
- BasicExpressionVisitor.cs
- HttpChannelHelper.cs
- UnaryNode.cs
- SynchronizedDispatch.cs
- WizardSideBarListControlItemEventArgs.cs
- XmlAtomicValue.cs
- RequestStatusBarUpdateEventArgs.cs
- CompositeFontParser.cs
- ConnectionStringSettings.cs
- WebResourceAttribute.cs
- ControlCachePolicy.cs
- EventSource.cs
- CookieParameter.cs
- GcHandle.cs
- ProfileSettingsCollection.cs
- MappedMetaModel.cs
- SiteIdentityPermission.cs
- DiscoveryService.cs
- CryptoKeySecurity.cs
- MemberMaps.cs
- EntityChangedParams.cs
- AutoCompleteStringCollection.cs
- LicenseContext.cs
- FrameworkRichTextComposition.cs
- PointKeyFrameCollection.cs
- TextWriter.cs
- CompiledIdentityConstraint.cs
- SelectedDatesCollection.cs
- ReachIDocumentPaginatorSerializer.cs
- TextSelectionHelper.cs
- XmlCharacterData.cs
- HtmlInputCheckBox.cs
- CurrencyWrapper.cs
- PrintEvent.cs
- XmlNamespaceManager.cs
- UInt16.cs
- TextAdaptor.cs
- SecurityPermission.cs
- UserControlBuildProvider.cs
- PropertyPath.cs
- ArrayElementGridEntry.cs
- TextFormatterImp.cs
- OleServicesContext.cs
- GenericPrincipal.cs
- CodeSnippetExpression.cs
- CheckBoxRenderer.cs
- AppSettingsSection.cs
- RuntimeCompatibilityAttribute.cs
- DBSchemaRow.cs
- TreeViewImageGenerator.cs