Category : asp.net

I’m trying to build my first asp.net core & postgres docker-compose and everything seems to work. Besides, that the localhost wouldn’t open. When I try to connect to http://localhost:5000/ I get ERR_EMPTY_RESPONSE as response. The docker-compose looks like this: version: ‘3.8’ networks: stockappapi-dev: driver: bridge services: stockappapi: image: stockappapi:latest build: context: . dockerfile: Dockerfile ports: ..

Read more

I’m using the following Dockerfile to build an asp.net project using docker containers. FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build WORKDIR /src COPY . . WORKDIR "/src/IdentityANSP/" RUN dotnet build "IdentityANSP.csproj" -c Release -o /app FROM build AS publish RUN dotnet publish "IdentityANSP.csproj" -c Release -o /app FROM ..

Read more

I have made an ASP.NET API with scaffolding. I have generated a docker file in Visual Studio 2019: #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base WORKDIR /app EXPOSE 80 FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build WORKDIR /src COPY ["CoinAPI.csproj", "CoinAPI/"] RUN dotnet restore ..

Read more

I’m trying to build a ASP.NET CORE dockerfile, which looks like this: FROM mcr.microsoft.com/dotnet/sdk:3.1-alpine AS build WORKDIR /app ENV PATH="${PATH}:/root/.dotnet/tools" COPY *.csproj ./ RUN dotnet restore StockApp.API.csproj COPY . ./ RUN dotnet publish StockApp.API.csproj -c Release -o out FROM mcr.microsoft.com/dotnet/aspnet:3.1-alpine AS runtime WORKDIR /app COPY –from=build /app/out . ENTRYPOINT ["dotnet", "StockApp.API.dll"] However, when I try ..

Read more

I have Asp.net core 5 webapi microservice comminicate with unmanaged C++ (32bit) code. C++ DLL code can be run only on Windows OS. I have configured my project x86 platform target and define Windows docker. When run applicaltion/microsrivice without Docker everything work fine. I guess that default docker configuration doesn’t suite, because x86 platform configuration. ..

Read more

I have an ASP.NET 4.6.2 application running inside a Docker container on Windows Server 2016. The application is having an error. It is my understanding that all errors in ASP.NET are by default written to the Event Log. However, when I run this command: Get-EventLog -LogName System -Newest 5 I see nothing relating to ASP.NET ..

Read more

I have an exception filter in my application – a mechanism used to handle all the exceptions occuring in my system. The definition of such a filter is presented here: public sealed class ExceptionFilter : ExceptionFilterAttribute { private const string ResponseContentType = "application/json"; public override void OnException(ExceptionContext exceptionContext) { var response = exceptionContext.HttpContext.Response; var message ..

Read more

We have developed two ASP.NET CORE (5.0) microservices and deployed them inside docker http://localhost:28621/stock http://localhost:62362/user Both are easily accessible from browser. We have used ocelot gateway for API gateway. When we deployed it inside docker we got following error warn: Ocelot.DownstreamRouteFinder.Middleware.DownstreamRouteFinderMiddleware[0] requestId: 0HM8658EF6KHC:00000002, previousRequestId: no previous request id, message: DownstreamRouteFinderMiddleware setting pipeline errors. IDownstreamRouteFinder returned ..

Read more

I’ve setup a Docker-Compose file that creates a mariadb database and aspnet backend (both from docker files I’ve written). If I expose ports and run the containers outside of a compose (using localhost) or set network_mode: "host" in the docker-compose file then the app interacts as expected. However, using the default bridge network that the ..

Read more