dopalittle.blogg.se

Code on time copying from wwwroot
Code on time copying from wwwroot










I needed to explicitly say, which csproj file to build and which one to publish. How can the static files be included into the docker image? While, running inside docker, it results in an HTML Output of this: In the Views, my app includes the CSS files like this: But as I already said, none of the static files can be accessed. IMPORTANT: This session call MUST go before UseMvc()Īnd the static files are (mostly) all accessed with correct case sensitivity. Yes, I am using UseStaticFiles: public void Configure(IApplicationBuilder app, IWebHostEnvironment env) Here is the Dockerfile: FROM /dotnet/core/aspnet:3.0-buster-slim AS baseįROM /dotnet/core/sdk:3.0-buster AS build But if I do, it results in an error like "Duplicate files included" or something like that.

code on time copying from wwwroot

No need to define them separately in the csproj file. No directory called "I am not sure, if the wwwroot directory belongs here? Or is the directory included in the dll of the application?Īfter searching a lot (also found some helpful questions here on StackOverflow), I found out that files are included to the building process automatically. So i logged in to the container and started observing the contents of /app. The web site looks like rubbish (but loads, though). All these file requests result in a 404 HTTP error. No problem here, the container is running and serving requests.īut it is not serving the static files at all. Then I load this image via kubernetes on a Ubuntu Server.

code on time copying from wwwroot

It contains static files in wwwroot of course. One project ("one") is the UI of the application. I got a Visual Studio Solution, containing 3 projects.












Code on time copying from wwwroot