Getting Microsoft.AspNetCore.Hosting.Diagnostics[6] Application startup exception in .NET Core 3

Dilip

I am getting below error while running Web API Application with .NET Core 3.0. I have implemented Attribute Routing and using the below code in Configure method of statup.cs

app.UseEndpoints(endpoints =>
{
    endpoints.MapControllers();
});

Error:

crit: Microsoft.AspNetCore.Hosting.Diagnostics[6]
      Application startup exception
System.ArgumentException: There is an incomplete parameter in the route template. Check that each '{' character has a matching '}' character. (Parameter 'routeTemplate')
 ---> Microsoft.AspNetCore.Routing.Patterns.RoutePatternException: There is an incomplete parameter in the route template. Check that each '{' character has a matching '}' character.
   at Microsoft.AspNetCore.Routing.Patterns.RoutePatternParser.Parse(String pattern)
   at Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory.Parse(String pattern)
   at Microsoft.AspNetCore.Routing.Template.TemplateParser.Parse(String routeTemplate)
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Routing.Template.TemplateParser.Parse(String routeTemplate)
   at Microsoft.AspNetCore.Mvc.ApplicationModels.InferParameterBindingInfoConvention.ParameterExistsInAnyRoute(ActionModel action, String parameterName)   
   at Microsoft.AspNetCore.Mvc.ApplicationModels.InferParameterBindingInfoConvention.InferBindingSourceForParameter(ParameterModel parameter)

Thanks!

Dilip

I have resolved this. I forgot to add the closing "}" for one of the Http Action in my Attribute Routing.

[HttpPost("{id}/like/{recipientId")]

as you can see the closing "}" is missing after recipientId. I think the error is totally misleading.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

.NET Core3でのMicrosoft.AspNetCore.Hosting.Diagnostics [6]アプリケーション起動例外の取得

分類Dev

.Net Core2.xでのMicrosoft.AspNetCore.Hosting.WindowsServicesの使用

分類Dev

Microsoft.AspNetCore.Hosting.Internal.WebHostおよびlog4net.LogicalThreadContext.Properties ["requestid"]

分類Dev

Microsoft.AspNetCore.Hosting.Internal.WebHostおよびlog4net.LogicalThreadContext.Properties ["requestid"]

分類Dev

Could not load type 'Context' from assembly 'Microsoft.AspNetCore.Hosting'

分類Dev

Run async code during startup in a ASP.Net Core application

分類Dev

How to decrypt .AspNetCore.Identity.Application cookie in ASP.NET Core 3.0?

分類Dev

既存のMicrosoft.AspNet.IdentityDB(EF 6)をMicrosoft.AspNetCore.Identity(EF Core)に移行します

分類Dev

Where can I find the ASP.NET Core 2 source code? Specifically for Microsoft.AspNetCore.Authentication.OpenIdConnect

分類Dev

ASP.NET Core 2.0 WebAPIでMicrosoft.AspNetCore.JsonPatchを構成して使用する方法

分類Dev

.Net Core2.2でMicrosoft.AspNetCore.Mvc.Internal.ActionContext.GetNormalizedRouteValueを解決する方法

分類Dev

System.TypeLoadException: 'メソッド' GetItem'in type 'Microsoft.AspNetCore.Mvc.Razor.Internal.FileProviderRazorProjectFileSystem'in asp.net core

分類Dev

ASP.NET Core 3.0で.AspNetCore.Identity.Application Cookieを復号化する方法は?

分類Dev

.NET Framework4.6.1上のMicrosoft.AspNetCore.All

分類Dev

microsoft.aspnetcore.signalr.clientとmicrosoft.aspnetcore.signalr.client.coreの違いは何ですか?

分類Dev

Getting asset file doesn't have targetframework exception while publishing in .net core project

分類Dev

.NET Core 3 - IIS - Application Initialization doesn't work

分類Dev

ASP.Net Core2.0のタイプMicrosoft.AspNetCore.Identity.RoleManagerのサービスを解決できません

分類Dev

I'm getting an DirectoryNotFoundException error after published an blazor assembly application ASP.NET CORE hosted in IIS

分類Dev

ASP.NET Core 3:ルートプロバイダーからのスコープサービス 'Microsoft.AspNetCore.Identity.UserManager`1 [Alpha.Models.Identity.User]'を解決できません

分類Dev

ASP.NET Core hosting environment variable ignored

分類Dev

ASP.NET Core hosting - 500 internal server error

分類Dev

Publishing and hosting Web API developed in .net core through IIS

分類Dev

Hosting Web API in .Net Core Worker Service - cannot reference IWebHostEnvironment

分類Dev

ASP.NET MVC Coreでは、Microsoft.AspNetCore.Razor.DesignおよびMicrosoft.VisualStudio.Web.CodeGeneration.Designパッケージは何をしますか?

分類Dev

Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ConnectionErrorException

分類Dev

Why am I getting an error when connecting to MySql in C# .Net Core 3

分類Dev

Microsoft.AspNet.Identity.CoreとMicrosoft.AspNetCore.Identityの違いは何ですか?

分類Dev

VSTS-ASP.NET Core 2.0のビルド、コンパイルエラー:アセンブリ "Microsoft.AspNetCore.Mvc.ViewFeatures"が見つかりませんでした

Related 関連記事

  1. 1

    .NET Core3でのMicrosoft.AspNetCore.Hosting.Diagnostics [6]アプリケーション起動例外の取得

  2. 2

    .Net Core2.xでのMicrosoft.AspNetCore.Hosting.WindowsServicesの使用

  3. 3

    Microsoft.AspNetCore.Hosting.Internal.WebHostおよびlog4net.LogicalThreadContext.Properties ["requestid"]

  4. 4

    Microsoft.AspNetCore.Hosting.Internal.WebHostおよびlog4net.LogicalThreadContext.Properties ["requestid"]

  5. 5

    Could not load type 'Context' from assembly 'Microsoft.AspNetCore.Hosting'

  6. 6

    Run async code during startup in a ASP.Net Core application

  7. 7

    How to decrypt .AspNetCore.Identity.Application cookie in ASP.NET Core 3.0?

  8. 8

    既存のMicrosoft.AspNet.IdentityDB(EF 6)をMicrosoft.AspNetCore.Identity(EF Core)に移行します

  9. 9

    Where can I find the ASP.NET Core 2 source code? Specifically for Microsoft.AspNetCore.Authentication.OpenIdConnect

  10. 10

    ASP.NET Core 2.0 WebAPIでMicrosoft.AspNetCore.JsonPatchを構成して使用する方法

  11. 11

    .Net Core2.2でMicrosoft.AspNetCore.Mvc.Internal.ActionContext.GetNormalizedRouteValueを解決する方法

  12. 12

    System.TypeLoadException: 'メソッド' GetItem'in type 'Microsoft.AspNetCore.Mvc.Razor.Internal.FileProviderRazorProjectFileSystem'in asp.net core

  13. 13

    ASP.NET Core 3.0で.AspNetCore.Identity.Application Cookieを復号化する方法は?

  14. 14

    .NET Framework4.6.1上のMicrosoft.AspNetCore.All

  15. 15

    microsoft.aspnetcore.signalr.clientとmicrosoft.aspnetcore.signalr.client.coreの違いは何ですか?

  16. 16

    Getting asset file doesn't have targetframework exception while publishing in .net core project

  17. 17

    .NET Core 3 - IIS - Application Initialization doesn't work

  18. 18

    ASP.Net Core2.0のタイプMicrosoft.AspNetCore.Identity.RoleManagerのサービスを解決できません

  19. 19

    I'm getting an DirectoryNotFoundException error after published an blazor assembly application ASP.NET CORE hosted in IIS

  20. 20

    ASP.NET Core 3:ルートプロバイダーからのスコープサービス 'Microsoft.AspNetCore.Identity.UserManager`1 [Alpha.Models.Identity.User]'を解決できません

  21. 21

    ASP.NET Core hosting environment variable ignored

  22. 22

    ASP.NET Core hosting - 500 internal server error

  23. 23

    Publishing and hosting Web API developed in .net core through IIS

  24. 24

    Hosting Web API in .Net Core Worker Service - cannot reference IWebHostEnvironment

  25. 25

    ASP.NET MVC Coreでは、Microsoft.AspNetCore.Razor.DesignおよびMicrosoft.VisualStudio.Web.CodeGeneration.Designパッケージは何をしますか?

  26. 26

    Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ConnectionErrorException

  27. 27

    Why am I getting an error when connecting to MySql in C# .Net Core 3

  28. 28

    Microsoft.AspNet.Identity.CoreとMicrosoft.AspNetCore.Identityの違いは何ですか?

  29. 29

    VSTS-ASP.NET Core 2.0のビルド、コンパイルエラー:アセンブリ "Microsoft.AspNetCore.Mvc.ViewFeatures"が見つかりませんでした

ホットタグ

アーカイブ