Why is access to the path /app/ocelot.json
denied?
#1956
-
I'm using ocelot in dotnet 8 Here is my builder.Configuration
.SetBasePath(environment.ContentRootPath).AddJsonFile("ocelot.json", false, true)
.AddOcelot(environment)
.AddEnvironmentVariables();
builder.Services
.AddOcelot(configuration); and even when I'm trying to remove read-only attribute I'm getting the same error var file = new FileInfo("ocelot.json")
{
IsReadOnly = false
};
file.CopyTo(Path.Combine(environment.ContentRootPath, "ocelot.json"), true); I've already checked issues and haven't find the solution except this #1216 which seems like it isn't finished yet Specifications
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi Muhammad! I can't get it, is it a bug or do you ask the question "How to configure"? Please upload whole solution to GitHub for review, or attach more artifacts: JSON config, Ocelot Startup C# code, and Ocelot app logs with errors/exceptions.
Yeap, setup of Docker environment is out of the scope of Ocelot. But, I agree that we don't have much documentation on how to properly run Ocelot in a Docker environment: Search for "docker".
This is Linux OS in Docker environment issue (WSL is Linux, aka Ubuntu Linux build). Please refer to Linux or Ubuntu documentation, or read more docs for WSL setup. |
Beta Was this translation helpful? Give feedback.
-
Regarding #1216 and the Config in-Memory feature... 🆗 We can prioritize this feature... In any case, having this feature doesn't mean all your DevOps problems with Docker and virtual environments will go away... Do you understand that? |
Beta Was this translation helpful? Give feedback.
OK I added the Feb'24 label on Feb 23
We will try to deliver the #1216 feature in Feb'24 release...