Tag : c#

I have a visual studio application and I want to run my tests in dockerfile once the container is created. I am using .net framework 4.7.2 Here’s is a little sample of my code, public static string Reverse(string s) { char[] charArray = s.ToCharArray(); Array.Reverse(charArray); return new string(charArray); } using NUnit.Framework; namespace aspnetapptest { using ..

Read more

I’m developing this server hosted in a Kubernetes cluster which uses some basic certificate-based authentication. I have added the relevant parts of the server and client code but since this is quite a bit of lines I pasted it bellow with some explanatory text. The certificates used here were created based on this article. The ..

Read more

My .net core application needs to read data from an oracle Db. here is my connection string: "ConnectionString": "data source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=somehost)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=somename)));user id=someuserid;password=somepass;Persist Security Info=true" It works fine locally but once I deploy it to docker it fails with this error (same user and pass): ORA-12545: Network Transport: Unable to resolve connect hostname note that firewall is ..

Read more

I have added a docker file using VS -> Add-> Docker Support… from right-click on the Azure Function App project. Below is decker file text… FROM mcr.microsoft.com/azure-functions/dotnet:2.0 AS base WORKDIR /home/site/wwwroot EXPOSE 80 FROM mcr.microsoft.com/dotnet/sdk:2.1 AS build WORKDIR /src COPY ["AzureIp.Functions.C2DMessageAcknowledge/NuGet.config", "AzureIp.Functions.C2DMessageAcknowledge/"] COPY ["AzureIp.Repository/NuGet.config", "AzureIp.Repository/"] COPY ["AzureIp.Models/NuGet.config", "AzureIp.Models/"] COPY ["AzureIp.DeviceManagement.Model/NuGet.config", "AzureIp.DeviceManagement.Model/"] COPY ["AzureIp.DeviceOperation.Model/NuGet.config", "AzureIp.DeviceOperation.Model/"] COPY ..

Read more

My file is present in cppweb directory PS D:programmingcppweb> ls Directory: D:programmingcppweb Mode LastWriteTime Length Name —- ————- —— —- d—– 07-06-2021 09:54 cppbox d—– 08-06-2021 08:21 hello_crow -a—- 08-06-2021 08:17 315598 crow_all.h I try to create volume PS D:programmingcppweb> docker run -v /programming/cppweb:/usr/src/cppweb -ti cppbox:latest bash [email protected]:/# cd /usr/src/cppweb [email protected]:/usr/src/cppweb# ls [email protected]:/usr/src/cppweb# but in ..

Read more

I have a dockerized ASP.NET Core app that I’m trying to run locally under Linux (Fedora 33). I’d like to disable HTTPS so I don’t have to deal with constant certificate errors. To do this I simply disabled the HTTPS redirect feature which is included by default, however the app then wasn’t responding to any ..

Read more

I’m trying to create a simple UDP Server/Client app in C# and dockerize the server; I’ve simplified the program for debugging Server: class Server { readonly static BroadcastReceiver recv = new BroadcastReceiver(); static void Main() { recv.StartReceive(); Console.WriteLine("Started"); while(true) { } } } class BroadcastReceiver { readonly UdpClient listener; public BroadcastReceiver() { // listen to ..

Read more