Skip to content

Commit aa98b85

Browse files
author
tadic-luka
authored
Update README.md
EnableEndpointRouting should be set to false. Otherwise people will get error: Application startup exception: System.InvalidOperationException: Endpoint Routing does not support 'IApplicationBuilder.UseMvc(...)'. To use 'IApplicationBuilder.UseMvc' set 'MvcOptions.EnableEndpointRouting = false' inside 'ConfigureServices(...). The solution is even proposed in stack trace. Issue was opened on dotnet/aspnetcore#9542 and it is explained there what should be done.
1 parent f64b780 commit aa98b85

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ public static IWebHost BuildWebHost(string[] args)
6464
Open the Electron Window in the Startup.cs file:
6565

6666
```csharp
67+
public void ConfigureServices(IServiceCollection services)
68+
{
69+
services.AddMvc(option => option.EnableEndpointRouting = false);
70+
}
71+
6772
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
6873
{
6974
if (env.IsDevelopment())

0 commit comments

Comments
 (0)