{"action":"created","issue":{"url":"https://api.github.com/repos/Glimpse/Glimpse/issues/596","labels_url":"https://api.github.com/repos/Glimpse/Glimpse/issues/596/labels{/name}","comments_url":"https://api.github.com/repos/Glimpse/Glimpse/issues/596/comments","events_url":"https://api.github.com/repos/Glimpse/Glimpse/issues/596/events","html_url":"https://github.com/Glimpse/Glimpse/issues/596","id":21753933,"number":596,"title":"Ajax requests to ASP.NET WebForms WebMethods are not captured","user":{"login":"shrichards","id":1400283,"avatar_url":"https://avatars.githubusercontent.com/u/1400283?v=3","gravatar_id":"","url":"https://api.github.com/users/shrichards","html_url":"https://github.com/shrichards","followers_url":"https://api.github.com/users/shrichards/followers","following_url":"https://api.github.com/users/shrichards/following{/other_user}","gists_url":"https://api.github.com/users/shrichards/gists{/gist_id}","starred_url":"https://api.github.com/users/shrichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrichards/subscriptions","organizations_url":"https://api.github.com/users/shrichards/orgs","repos_url":"https://api.github.com/users/shrichards/repos","events_url":"https://api.github.com/users/shrichards/events{/privacy}","received_events_url":"https://api.github.com/users/shrichards/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2013-10-29T12:40:39Z","updated_at":"2015-01-08T10:41:34Z","closed_at":null,"body":"I have a simple ASP.NET WebForm page with a single server-side `WebMethod`, and the following Glimpse packages installed:\r\n\r\n* Glimpse.Core v1.7.0\r\n* Glimse.AspNet v1.5.0\r\n* Glimpse.WebForms v1.0.1\r\n\r\nThe entirety of the code-behind is:\r\n\r\n```csharp\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Web.Services;\r\n\r\nnamespace WebFormAjaxTest\r\n{\r\n    public partial class _Default : System.Web.UI.Page\r\n    {\r\n        protected void Page_Load(object sender, EventArgs e)\r\n        {\r\n        }\r\n        [WebMethod]\r\n        public static string GetTheTime()\r\n        {\r\n            return DateTime.Now.ToShortTimeString();\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nThe client side code consists of a single button that, when clicked, makes an ajax request to the `GetTheTime` method in the code-behind:\r\n\r\n```html\r\n<%@ Page Title=\"Home Page\" Language=\"C#\"  AutoEventWireup=\"true\"  CodeBehind=\"Default.aspx.cs\" Inherits=\"WebFormAjaxTest._Default\" %>\r\n<html>\r\n    <head>\r\n        <title>WebForm Ajax Test</title>\r\n        <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\"></script>\r\n    </head>\r\n    <body>\r\n        <div id=\"the-time\">\r\n        </div>\r\n        <input type=\"button\" id=\"get-time\" value=\"Get The Time\" />\r\n\r\n        <script type=\"text/javascript\">\r\n\r\n            $(function () {\r\n                $(\"#get-time\").click(getServerTime);\r\n            });\r\n\r\n            function getServerTime() {\r\n                $.ajax({\r\n                    type: \"POST\",\r\n                    url: \"Default.aspx/GetTheTime\",\r\n                    contentType: \"application/json; charset=utf-8\",\r\n                    dataType: \"json\",\r\n                    success: function (msg) {\r\n                        $('#the-time').text(msg.d);\r\n                    }\r\n                });\r\n            }\r\n        </script>\r\n    </body>\r\n</html>\r\n```\r\n\r\n*These ajax request appear in neither the HUD, nor in the Glimpse Ajax tab.*\r\n\r\n(Here's a solution with this code in it: https://dl.dropboxusercontent.com/u/2434695/WebFormAjaxTest.zip)\r\n\r\nIt's not immediately clear to me whether or not Glimpse supports capturing this type of request, though it would be immensely useful for me.\r\n\r\nIf this is currently not supported, I'd be more than willing to take a crack at implementing it (with a bit of direction)."},"comment":{"url":"https://api.github.com/repos/Glimpse/Glimpse/issues/comments/69163011","html_url":"https://github.com/Glimpse/Glimpse/issues/596#issuecomment-69163011","issue_url":"https://api.github.com/repos/Glimpse/Glimpse/issues/596","id":69163011,"user":{"login":"CGijbels","id":1467346,"avatar_url":"https://avatars.githubusercontent.com/u/1467346?v=3","gravatar_id":"","url":"https://api.github.com/users/CGijbels","html_url":"https://github.com/CGijbels","followers_url":"https://api.github.com/users/CGijbels/followers","following_url":"https://api.github.com/users/CGijbels/following{/other_user}","gists_url":"https://api.github.com/users/CGijbels/gists{/gist_id}","starred_url":"https://api.github.com/users/CGijbels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CGijbels/subscriptions","organizations_url":"https://api.github.com/users/CGijbels/orgs","repos_url":"https://api.github.com/users/CGijbels/repos","events_url":"https://api.github.com/users/CGijbels/events{/privacy}","received_events_url":"https://api.github.com/users/CGijbels/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T10:41:33Z","updated_at":"2015-01-08T10:41:33Z","body":"@hbopuri do the requests show up in the history tab?\r\n\r\nAre there differences in the way the Ajax calls are being made (those that end up being marked as Ajax methods and those that aren't) ?\r\n\r\nCan you check with developer tools (F12) in the browser if the requests that are not being detected as Ajax requests (but should), if they contain the __X-Requested-With__ header with the value __XMLHttpRequest__ ?"}}