Skip to content

Commit a8c948e

Browse files
author
Rick Anderson
committed
update to 5.0
1 parent ff1c249 commit a8c948e

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

WebServices/TodoREST/TodoAPI/TodoAPI/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Microsoft.AspNetCore;
2-
using Microsoft.AspNetCore.Hosting;
1+
using Microsoft.AspNetCore.Hosting;
32
using Microsoft.Extensions.Hosting;
43

54
namespace TodoAPI

WebServices/TodoREST/TodoAPI/TodoAPI/Startup.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,18 @@ public void ConfigureServices(IServiceCollection services)
2626
}
2727

2828
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
29+
#region snippet
2930
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
3031
{
3132
if (env.IsDevelopment())
3233
{
3334
app.UseDeveloperExceptionPage();
3435
}
35-
36-
// For mobile apps we want to allow http traffic through
37-
#if !DEBUG
38-
app.UseHttpsRedirection();
39-
#endif
36+
else
37+
{
38+
// For mobile apps, allow http traffic.
39+
app.UseHttpsRedirection();
40+
}
4041

4142
app.UseRouting();
4243

@@ -47,6 +48,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
4748
endpoints.MapControllers();
4849
});
4950
}
51+
#endregion
5052
}
5153
}
5254

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55
</PropertyGroup>
66

77
</Project>

0 commit comments

Comments
 (0)