{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/3044","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/3044/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/3044/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/3044/events","html_url":"https://github.com/aspnet/Mvc/issues/3044","id":103347966,"number":3044,"title":"UrlResolutionTagHelper should have an option to not throw if custom UrlHelper appends to url","user":{"login":"pranavkm","id":174281,"avatar_url":"https://avatars.githubusercontent.com/u/174281?v=3","gravatar_id":"","url":"https://api.github.com/users/pranavkm","html_url":"https://github.com/pranavkm","followers_url":"https://api.github.com/users/pranavkm/followers","following_url":"https://api.github.com/users/pranavkm/following{/other_user}","gists_url":"https://api.github.com/users/pranavkm/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavkm/subscriptions","organizations_url":"https://api.github.com/users/pranavkm/orgs","repos_url":"https://api.github.com/users/pranavkm/repos","events_url":"https://api.github.com/users/pranavkm/events{/privacy}","received_events_url":"https://api.github.com/users/pranavkm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/Mvc/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-26T19:35:43Z","updated_at":"2015-08-26T19:35:43Z","closed_at":null,"body":"Scenario:\r\n\r\nI have a custom `IUrlHelper`:\r\n\r\n```C#\r\npublic class CdnUrlHelper : UrlHelper\r\n {\r\n        const string CdnContentVersion = \"3.0\";\r\n        public CdnUrlHelper(IActionContextAccessor accessor, IActionSelector actionSelector)\r\n            : base(accessor, actionSelector)\r\n        {\r\n        }\r\n\r\n        public override string Content(string contentPath)\r\n        {\r\n            return $\"//mycdn/{contentPath.Substring(1)}?_v={CdnContentVersion}\";\r\n        }\r\n    }\r\n```\r\n\r\nUsing a ~/ url in the app (`<link href=\"~/content/css\" />`) fails with:\r\n\r\n`InvalidOperationException: Unexpected return value from 'IUrlHelper.Content' for URL '~/images/ASP-NET-Banners-01.png'. If the 'IUrlHelper' service has been overridden, change 'Content' to replace only the '~/' prefix. Otherwise, add the following directive to the Razor page to disable URL resolution relative to the application's 'webroot' setting: @removeTagHelper \"Microsoft.AspNet.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNet.Mvc.Razor\"`\r\n\r\nDoesn't seem like there's a way to turn off the exception.\r\n"}}