public GetHandler ( HttpContext context, string verb, string url, string filePath ) : IHttpHandler | ||
context | HttpContext | |
verb | string | |
url | string | |
filePath | string | |
Résultat | IHttpHandler |
public IHttpHandler GetHttpHandler(RequestContext requestContext) { WebServiceHandlerFactory wshFactory = new WebServiceHandlerFactory(); return wshFactory.GetHandler( HttpContext.Current, "GET,POST", VirtualPath, HttpContext.Current.Server.MapPath(VirtualPath)); }
IHttpHandler IHttpHandlerFactory.GetHandler(HttpContext context, string requestType, string url, string pathTranslated) { IHttpHandler handler = null; if (context.Request.QueryString != null) pathTranslated = getPathTranslatedFromSiteGeneratorGUI(url, pathTranslated); // check if it is an .aspx page if (".aspx" == Path.GetExtension(pathTranslated)) { context.RewritePath(url, url, context.Request.QueryString.ToString()); handler = PageParser.GetCompiledPageInstance(url, pathTranslated, context); } else if (".asmx" == Path.GetExtension(pathTranslated).ToLower()) { WebServiceHandlerFactory wshf = new WebServiceHandlerFactory(); handler = wshf.GetHandler(context, requestType, url, pathTranslated); } else { ProcessStaticContent(pathTranslated); // Process page and HttpContext.Current.Response.End(); // end here } return handler; }
public override void ProcessMubbleRequest(System.Web.HttpContext context) { DateTime startDate = DateTime.Now; WebServiceHandlerFactory factory = new WebServiceHandlerFactory(); IHttpHandler handler = factory.GetHandler(context, "get", "~/WebServices/Content.asmx", ""); handler.ProcessRequest(context); }