question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Carter seems to ignore UsePathBase

See original GitHub issue
app.UseRouting();
app.UsePathBase("/api");
app.UseEndpoints(builder => builder.MapCarter());

When using Carter with a base path, it seems to ignore it. Do I have to go define this as a base module?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jbogardcommented, Jan 10, 2022

It’s not Carter, it’s a thing with minimal routing:

https://github.com/dotnet/aspnetcore/issues/38448

Adding the call to UseRouting fixed for me:

app.UsePathBase("/api");
app.UseRouting();
app.MapCarter();
1reaction
jchannoncommented, May 25, 2020

Correct.

Didn’t know if that middleware. Could add some code to check if it’s set but a base module will work for now

On Mon, 25 May 2020 at 06:38, Phillip Haydon notifications@github.com wrote:

app.UseRouting(); app.UsePathBase(“/api”); app.UseEndpoints(builder => builder.MapCarter());

When using Carter with a base path, it seems to ignore it. Do I have to go define this as a base module?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CarterCommunity/Carter/issues/247, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZVJROCPKNFCP32X2Z3SLRTH753ANCNFSM4NJHPLHA .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blazor Server Path Issues
There's several ways I have found for setting the path of the app. app.UsePathBase("/myapp") app.UseStaticFiles("/myapp"). Setting these seem ...
Read more >
Understanding PathBase in ASP.NET Core
In this post I'll describe a lesser-known property on HttpRequest called `PathBase`. I describe what it does, when it's useful, ...
Read more >
ASP.NET Community Standup - A first look at Carter on .NET 6
Carter is framework that is a thin layer of extension methods and functionality over ASP.NET Core allowing code to be more explicit and...
Read more >
The open source Carter Community Project adds ...
Carter is ASP.NET. You can add Carter to your existing ASP.NET Core app by just " dotnet add package carter " and adding...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found