© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
4 replies
Very Funny

Unable to find endpoints. Invalid URI

I have this code on my controller
[Route("api/[controller]")]
[ApiController]
[Authorize(Roles = "Admin")]
public class AdminController : ControllerBase
[Route("api/[controller]")]
[ApiController]
[Authorize(Roles = "Admin")]
public class AdminController : ControllerBase


In other projects
https://localhost:<PORT>/api/Admin/...
https://localhost:<PORT>/api/Admin/...
would return the data. But now the URI is invalid.

As it is a .NET 8 project, I am unsure as to how to add swagger as well
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

System.UriFormatException: 'Invalid URI: The hostname could not be parsed.'
C#CC# / help
3y ago
Unable to find error.
C#CC# / help
4mo ago
Selenium-unable to find element
C#CC# / help
11mo ago
Unable to find symbol file
C#CC# / help
14mo ago