The application completed without reading the entire request body, .net core 2.1.1

后端 未结 10 1356
-上瘾入骨i
-上瘾入骨i 2020-12-14 07:21

I have created a user register controller to register users with repository design pattern. My controller looks like this.

[Route(\"api/[controller]\")]
             


        
10条回答
  •  -上瘾入骨i
    2020-12-14 07:28

    It happened to me in a new ASP.NET Core 2.1 service when debugging in localhost because I had in Startup.Configure:

    app.UseHttpsRedirection();
    

    I deactivated this setting when debugging locally:

    if (env.IsDevelopment())
    {
         app.UseDeveloperExceptionPage();
    }
    else
    {
         app.UseHttpsRedirection();
    }
    

提交回复
热议问题