mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-23 04:36:45 +00:00
add razor live view
This commit is contained in:
parent
6e7f80e147
commit
3735ef928c
@ -9,6 +9,7 @@
|
|||||||
<PackageReference Include="IdentityModel" Version="5.0.0-preview.2" />
|
<PackageReference Include="IdentityModel" Version="5.0.0-preview.2" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.1" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.1" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.1" />
|
||||||
|
<PackageReference Include="Westwind.AspNetCore.LiveReload" Version="0.3.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -17,6 +17,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Westwind.AspNetCore.LiveReload;
|
||||||
|
|
||||||
namespace OidcSamples.TaxApp
|
namespace OidcSamples.TaxApp
|
||||||
{
|
{
|
||||||
@ -40,6 +41,13 @@ namespace OidcSamples.TaxApp
|
|||||||
|
|
||||||
services.AddRazorPages().AddRazorRuntimeCompilation();
|
services.AddRazorPages().AddRazorRuntimeCompilation();
|
||||||
|
|
||||||
|
services.AddLiveReload(config =>
|
||||||
|
{
|
||||||
|
// optional - use config instead
|
||||||
|
//config.LiveReloadEnabled = true;
|
||||||
|
//config.FolderToMonitor = Path.GetFullname(Path.Combine(Env.ContentRootPath,"..")) ;
|
||||||
|
});
|
||||||
|
|
||||||
services.AddControllersWithViews();
|
services.AddControllersWithViews();
|
||||||
|
|
||||||
services.AddAuthentication(options =>
|
services.AddAuthentication(options =>
|
||||||
@ -93,6 +101,9 @@ namespace OidcSamples.TaxApp
|
|||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||||
{
|
{
|
||||||
|
// IMPORTANT: Before **any other output generating middleware** handlers including error handlers
|
||||||
|
app.UseLiveReload();
|
||||||
|
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user