扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
<httpHandlers> <add verb="*" path="atlasglob.axd" type="Microsoft.Web.Globalization.GlobalizationHandler" validate="false"/> </httpHandlers> |
<httpHandlers> <remove verb="*" path="*.asmx"/> <add verb="*" path="*.asmx" type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/> </httpHandlers> |
1 public class ScriptHandlerFactory : IHttpHandlerFactory 2 { 3 // Methods 4 public ScriptHandlerFactory(); 5 private static void CheckAtlasWebServicesEnabled(); 6 public virtual IHttpHandler GetHandler(HttpContext context, string requestType, string url, string pathTranslated); 7 public virtual void ReleaseHandler(IHttpHandler handler); 8 9 // Fields 10 private IHttpHandlerFactory _restHandlerFactory; 11 private IHttpHandlerFactory _webServiceHandlerFactory; 12 13 // Nested Types 14 private class AsyncHandlerWrapper : ScriptHandlerFactory.HandlerWrapper, IHttpAsyncHandler, IHttpHandler 15 { 16 // Methods 17 internal AsyncHandlerWrapper(IHttpHandler originalHandler, IHttpHandlerFactory originalFactory); 18 public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData); 19 public void EndProcessRequest(IAsyncResult result); 20 } 21 22 private class AsyncHandlerWrapperWithSession : ScriptHandlerFactory.AsyncHandlerWrapper, IRequiresSessionState 23 { 24 // Methods 25 internal AsyncHandlerWrapperWithSession(IHttpHandler originalHandler, IHttpHandlerFactory originalFactory); 26 } 27 28 internal class HandlerWrapper : IHttpHandler 29 { 30 // Methods 31 internal HandlerWrapper(IHttpHandler originalHandler, IHttpHandlerFactory originalFactory); 32 public void ProcessRequest(HttpContext context); 33 internal void ReleaseHandler(); 34 35 // Properties 36 public bool IsReusable { get; } 37 38 // Fields 39 private IHttpHandlerFactory _originalFactory; 40 protected IHttpHandler _originalHandler; 41 } 42 43 internal class HandlerWrapperWithSession : ScriptHandlerFactory.HandlerWrapper, IRequiresSessionState 44 { 45 // Methods 46 internal HandlerWrapperWithSession(IHttpHandler originalHandler, IHttpHandlerFactory originalFactory); 47 } 48 } |
<microsoft.web> <webServices enableBrowserAccess="true" /> </microsoft.web> |
1 public ScriptHandlerFactory() 2 { 3 this._restHandlerFactory = new RestHandlerFactory(); 4 this._webServiceHandlerFactory = new WebServiceHandlerFactory(); 5 } |
<httpHandlers> …… <add path="*.asmx" verb="*" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="False" /> …… </httpHandlers> |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者