Kayıtlar

dotnet core etiketine sahip yayınlar gösteriliyor

Postman - 502 Connection Refused

Geçenlerde docker'ı kurcalamak için makineme kurmaya çalıştım. Proxy kullandığımız için bir sürü sorun yaşadım, hâlâ tam çözebilmiş değilim bu kısım ayrı bir sorun ama bu arada HTTP_PROXY, HTTPS_PROXY, NO_PROXY ortam değişkenlerini ya docker bilgisayara kurmuştu ya da ben proxy sorununu çözmek için tanımlamıştım (kesin hatırlamıyorum). Bir süre sonra .net core'daki bir servisimi postman ile test etmeye çalıştığımda 502 Connection Refused hatası almaya başladım, tarayıcıdan servisin get metodu düzgün şekilde çağrılabilmesine rağmen. Ama yine de sorunu servis tarafında olduğunu düşündüm niyeyse 😅 Neyse daha sonra mevzunun postman ile ilgili olabilme ihtimalini araştırınca şu linkte  HTTP_PROXY vs tanımlarına görünce bir anda şimşekler çaktı 👏 Yukarıda verdiğim linkte de göreceğiniz SET NO_PROXY=localhost,127.0.0.1 komutuyla ya da ortam değişkenleri tanımlarından (ben ikinci şekilde yaptım) ilgili tanımlamayı düzeltince sorun düzeldi. Umarım işinize yarar 😊

NuGet Behind Proxy

If you are in a network, which uses proxy, you may get below error while executing commands which uses nuget (like dotnet add package): error: Unable to load the service index for source https://api.nuget.org/v3/index.json. error:   A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond To prevent this error, first be sure that you can execute nuget command in a console. If you get below error, that means nuget.exe does not exists on your computer on it's in another directory. 'nuget.exe' is not recognized as an internal or external command, operable program or batch file. If nuget.exe is in another directory, you can switch that directory with change directory (for ex.:"cd c:\examplenugetdirectory"). If nuget.exe does not exists on your computer, you can install it from this link . Then you can execute below links: nuget.exe...