Задать вопрос
Timur2342
@Timur2342

Как исправить «info: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished HTTP/1.1 GET localhost:5183/favicon.ico — 400»?

Проект web api, по логике спрашивать лого не должен. При том что раньше апи работал нормально. Вроде нечего такого я не делал.
logs
dbug: Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory[12]
Registered model binder providers, in the following order: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.TryParseModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider
dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
Hosting starting
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[62]
User profile is available. Using '/home/timur/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37]
Reading data from file '/home/timur/.aspnet/DataProtection-Keys/key-0562e44a-75ac-42d0-ae6e-a6e1e4fc86c0.xml'.
dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18]
Found key {0562e44a-75ac-42d0-ae6e-a6e1e4fc86c0}.
dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13]
Considering key {0562e44a-75ac-42d0-ae6e-a6e1e4fc86c0} with expiration date 2024-10-10 14:23:57Z as default key.
dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0]
Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60
dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11]
Using managed symmetric algorithm 'System.Security.Cryptography.Aes'.
dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10]
Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'.
dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2]
Using key {0562e44a-75ac-42d0-ae6e-a6e1e4fc86c0} as the default key.
dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionHostedService[65]
Key ring with default key {0562e44a-75ac-42d0-ae6e-a6e1e4fc86c0} was loaded during application startup.
info: Microsoft.Hosting.Lifetime[14]
Now listening on: localhost:5183
dbug: Microsoft.AspNetCore.Hosting.Diagnostics[13]
Loaded hosting startup assembly FullstackApp1
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: /home/timur/Desktop/FullStackProj1/serverApp
dbug: Microsoft.Extensions.Hosting.Internal.Host[2]
Hosting started
dbug: Microsoft.AspNetCore.Server.Kestrel.Connections[39]
Connection id "0HN5875O0T2F5" accepted.
dbug: Microsoft.AspNetCore.Server.Kestrel.Connections[1]
Connection id "0HN5875O0T2F5" started.
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET localhost:5183/swagger/index.html - - -
dbug: Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware[1]
Allowed hosts: localhost:3000
info: Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware[6]
The host 'localhost:5183' does not match an allowed host.
dbug: Microsoft.AspNetCore.Server.Kestrel.Connections[9]
Connection id "0HN5875O0T2F5" completed keep alive response.
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 GET localhost:5183/swagger/index.html - 400 334 text/html 5.5174ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET localhost:5183/favicon.ico - - -
info: Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware[6]
The host 'localhost:5183' does not match an allowed host.
dbug: Microsoft.AspNetCore.Server.Kestrel.Connections[9]
Connection id "0HN5875O0T2F5" completed keep alive response.
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 GET localhost:5183/favicon.ico - 400 334 text/html 0.2814ms
dbug: Microsoft.AspNetCore.Server.Kestrel.Connections[10]
Connection id "0HN5875O0T2F5" disconnecting.
dbug: Microsoft.AspNetCore.Server.Kestrel.Connections[2]
Connection id "0HN5875O0T2F5" stopped.
dbug: Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets[7]
Connection id "0HN5875O0T2F5" sending FIN because: "The Socket transport's send loop completed gracefully."
От чего это?
  • Вопрос задан
  • 64 просмотра
Подписаться 1 Простой 1 комментарий
Решения вопроса 1
Timur2342
@Timur2342 Автор вопроса
Проблема решена!!!! Дело было в том что я "AllowedHosts"(appSettings.json) указал "localhost:4505", щас он на "localhost" и все работает.
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
borisdenis
@borisdenis
Ленив и вреден...
Насколько помню - лого запрашивает браузер. Если я открываю страницу апи, то он и лого запросит, если делаю запрос через curl, то никаких лого запрашиваться не будет.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы