Use AddNewtonsoftJson in RazorPages template (#6877)
This commit is contained in:
parent
07382c5da4
commit
371595962a
|
|
@ -16,7 +16,7 @@
|
||||||
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
|
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(OrganizationalAuth)' == 'True' OR '$(IndividualB2CAuth)' == 'True' OR '$(IndividualLocalAuth)' == 'True' ">
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="${MicrosoftAspNetCoreAuthenticationAzureADUIPackageVersion}" Condition="'$(OrganizationalAuth)' == 'True'" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="${MicrosoftAspNetCoreAuthenticationAzureADUIPackageVersion}" Condition="'$(OrganizationalAuth)' == 'True'" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="${MicrosoftAspNetCoreAuthenticationAzureADB2CUIPackageVersion}" Condition="'$(IndividualB2CAuth)' == 'True'" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="${MicrosoftAspNetCoreAuthenticationAzureADB2CUIPackageVersion}" Condition="'$(IndividualB2CAuth)' == 'True'" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="${MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' " />
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="${MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' " />
|
||||||
|
|
|
||||||
|
|
@ -125,9 +125,11 @@ namespace Company.WebApplication1
|
||||||
.RequireAuthenticatedUser()
|
.RequireAuthenticatedUser()
|
||||||
.Build();
|
.Build();
|
||||||
options.Filters.Add(new AuthorizeFilter(policy));
|
options.Filters.Add(new AuthorizeFilter(policy));
|
||||||
});
|
})
|
||||||
|
.AddNewtonsoftJson();
|
||||||
#else
|
#else
|
||||||
services.AddMvc();
|
services.AddMvc()
|
||||||
|
.AddNewtonsoftJson();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue