{"action":"created","issue":{"url":"https://api.github.com/repos/MiniProfiler/dotnet/issues/139","repository_url":"https://api.github.com/repos/MiniProfiler/dotnet","labels_url":"https://api.github.com/repos/MiniProfiler/dotnet/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/MiniProfiler/dotnet/issues/139/comments","events_url":"https://api.github.com/repos/MiniProfiler/dotnet/issues/139/events","html_url":"https://github.com/MiniProfiler/dotnet/issues/139","id":178467992,"number":139,"title":"/mini-profiler-resources/results returns 404 on server","user":{"login":"kmc059000","id":660670,"avatar_url":"https://avatars.githubusercontent.com/u/660670?v=3","gravatar_id":"","url":"https://api.github.com/users/kmc059000","html_url":"https://github.com/kmc059000","followers_url":"https://api.github.com/users/kmc059000/followers","following_url":"https://api.github.com/users/kmc059000/following{/other_user}","gists_url":"https://api.github.com/users/kmc059000/gists{/gist_id}","starred_url":"https://api.github.com/users/kmc059000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmc059000/subscriptions","organizations_url":"https://api.github.com/users/kmc059000/orgs","repos_url":"https://api.github.com/users/kmc059000/repos","events_url":"https://api.github.com/users/kmc059000/events{/privacy}","received_events_url":"https://api.github.com/users/kmc059000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-21T21:32:32Z","updated_at":"2016-12-23T02:32:16Z","closed_at":null,"body":"Miniprofiler works correctly when running locally. However when running on a server, it does not render at all. Looking at the network requests, it is  attempting to render miniprofiler, but the GET to /mini-profiler-resources/results returns a 404. \r\n\r\nI have attempted to add the following to the web.config with no luck, even though I have `runAllManagedModulesForAllRequests=true`\r\n\r\n```xml\r\n<add name=\"MiniProfiler\" path=\"mini-profiler-resources/*\" verb=\"*\" type=\"System.Web.Routing.UrlRoutingModule\" resourceType=\"Unspecified\" preCondition=\"integratedMode\" />\r\n```\r\n\r\nIf I open the site on the server it is hosted from using its IP address, miniprofiler does appear. We have multiple domains for the same site. So I know that miniprofiler CAN work from on this server.\r\n\r\nIf I make a request to /mini-profiler-resources/results myself through the browser (not through ajax, but by typing the address into my address bar), using any of the domains that the site uses, I get a 200 result. However it is the most recent profiling result from the request that was last made from the server itself. It never changes if I access the site from any other domain. It appears that it is only profiling local requests. In fact, the URL that the page displays is the URL using the IP address, and not any of the domains we use.\r\n\r\nIn `Application_BeginRequest()`, we have custom logic for determining whether to start miniprofiler for the request:\r\n\r\n```c#\r\nif((Request.IsLocal || someConditionThatIsTrue1) && someConditionThatIsTrue2))\r\n{\r\n    MiniProfiler.Start();\r\n}\r\n```\r\n\r\n`someConditionThatIsTrue1` and `someConditionThatIsTrue2` are both true in my case.\r\n\r\nI have tested, and I know that MiniProfiler.Start() is being called because the statement in the if statement is evaluating to true. Plus I've seen it work when using the IP address.\r\n\r\nWhat can we do to get miniprofiler to display in this environment?\r\n"},"comment":{"url":"https://api.github.com/repos/MiniProfiler/dotnet/issues/comments/268931352","html_url":"https://github.com/MiniProfiler/dotnet/issues/139#issuecomment-268931352","issue_url":"https://api.github.com/repos/MiniProfiler/dotnet/issues/139","id":268931352,"user":{"login":"NickCraver","id":454813,"avatar_url":"https://avatars.githubusercontent.com/u/454813?v=3","gravatar_id":"","url":"https://api.github.com/users/NickCraver","html_url":"https://github.com/NickCraver","followers_url":"https://api.github.com/users/NickCraver/followers","following_url":"https://api.github.com/users/NickCraver/following{/other_user}","gists_url":"https://api.github.com/users/NickCraver/gists{/gist_id}","starred_url":"https://api.github.com/users/NickCraver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickCraver/subscriptions","organizations_url":"https://api.github.com/users/NickCraver/orgs","repos_url":"https://api.github.com/users/NickCraver/repos","events_url":"https://api.github.com/users/NickCraver/events{/privacy}","received_events_url":"https://api.github.com/users/NickCraver/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T02:32:15Z","updated_at":"2016-12-23T02:32:15Z","body":"Is your site behind a load balancer? What request host is IIS actually seeing on these requests?"}}
{"actor":{"display_login":"NickCraver"}}