{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/1380","repository_url":"https://api.github.com/repos/aspnet/Hosting","labels_url":"https://api.github.com/repos/aspnet/Hosting/issues/1380/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Hosting/issues/1380/comments","events_url":"https://api.github.com/repos/aspnet/Hosting/issues/1380/events","html_url":"https://github.com/aspnet/Hosting/issues/1380","id":314405838,"number":1380,"title":"registering IHttpContextAccessor","user":{"login":"ecabigting","id":14327951,"avatar_url":"https://avatars1.githubusercontent.com/u/14327951?v=4","gravatar_id":"","url":"https://api.github.com/users/ecabigting","html_url":"https://github.com/ecabigting","followers_url":"https://api.github.com/users/ecabigting/followers","following_url":"https://api.github.com/users/ecabigting/following{/other_user}","gists_url":"https://api.github.com/users/ecabigting/gists{/gist_id}","starred_url":"https://api.github.com/users/ecabigting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecabigting/subscriptions","organizations_url":"https://api.github.com/users/ecabigting/orgs","repos_url":"https://api.github.com/users/ecabigting/repos","events_url":"https://api.github.com/users/ecabigting/events{/privacy}","received_events_url":"https://api.github.com/users/ecabigting/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-15T11:04:38Z","updated_at":"2018-04-15T11:29:45Z","closed_at":null,"author_association":"NONE","body":"I already did the what was explained in [#793](https://github.com/aspnet/Hosting/issues/793)\r\n\r\nThis is a snippet from my startup.cs \r\n\r\n`public void ConfigureServices(IServiceCollection services)\r\n{\r\nservices.AddMvc();\r\nservices.AddScoped<IMainHttpClient, MainHttpClient>();       services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();\r\nservices.AddScoped(sp => sp.GetRequiredService<IHttpContextAccessor>().HttpContext);           services.AddSignalR();`\r\n\r\nAnd still when I published, I still get the \r\n\r\n> Application startup exception: System.InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor' while attempting to activate 'Startup'\r\n\r\n error.\r\n\r\nI am publishing in IIS, with dotnet core module When I try to access the site it gives this error:\r\n\r\n`An error occurred while starting the application.\r\n\r\n.NET Core 4.6.26212.01 X86 v4.0.0.0    |   Microsoft.AspNetCore.Hosting version 2.0.1-rtm-125    |    Microsoft Windows 6.3.9600    |   Need help? `\r\n\r\nPlease help! Im becoming desperate :("},"comment":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/comments/381399208","html_url":"https://github.com/aspnet/Hosting/issues/1380#issuecomment-381399208","issue_url":"https://api.github.com/repos/aspnet/Hosting/issues/1380","id":381399208,"user":{"login":"ecabigting","id":14327951,"avatar_url":"https://avatars1.githubusercontent.com/u/14327951?v=4","gravatar_id":"","url":"https://api.github.com/users/ecabigting","html_url":"https://github.com/ecabigting","followers_url":"https://api.github.com/users/ecabigting/followers","following_url":"https://api.github.com/users/ecabigting/following{/other_user}","gists_url":"https://api.github.com/users/ecabigting/gists{/gist_id}","starred_url":"https://api.github.com/users/ecabigting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecabigting/subscriptions","organizations_url":"https://api.github.com/users/ecabigting/orgs","repos_url":"https://api.github.com/users/ecabigting/repos","events_url":"https://api.github.com/users/ecabigting/events{/privacy}","received_events_url":"https://api.github.com/users/ecabigting/received_events","type":"User","site_admin":false},"created_at":"2018-04-15T11:29:45Z","updated_at":"2018-04-15T11:29:45Z","author_association":"NONE","body":"I already removed it a while ago while testing, same error."}}
{"actor":{"display_login":"ecabigting"}}