asp.net-core-3.0

ASP.NET Core 3.0 not showing on Visual Studio 2019

拜拜、爱过 提交于 2019-11-29 02:51:46
I want to test the new Blazor server-side framework (aka Razor Components). I installed Visual Studio 2019 RC, and then the .Net Core 3.0 preview 2, following this official tutorial . After the install, I only see the ASP.NET Core 2.0 and the 2.1 on the "Create a new ASP.NET Core Web Application" page. The 3.0 is not showing up. I started to mess around, trying to install other packages from this page , uninstalled and reinstalled Visual Studio 2019, updated to the .NET Core Preview 3, installed several times the x64 and x86 packages in different orders, copy/paste the .Net Core binaries to

.Net Core 3.0 JsonSerializer populate existing object

寵の児 提交于 2019-11-28 22:52:45
问题 I'm preparing a migration from ASP.NET Core 2.2 to 3.0. As I don't use any more advanced JSON features (but maybe one as described below), and 3.0 now comes with a built-in namespace/classes for JSON, System.Text.Json , I decided to see if I could drop the previous default Newtonsoft.Json . Do note, I'm aware that System.Text.Json will not completely replace Newtonsoft.Json . I managed to do that everywhere, e.g. var obj = JsonSerializer.Parse<T>(jsonstring); var jsonstring = JsonSerializer

How do you create a API/IdentityServer/Blazor(server-side) application?

淺唱寂寞╮ 提交于 2019-11-28 06:38:12
问题 I attempted to build this application myself but, have hit several stumbling blocks along the way. I am thinking that it may be best to step back and take a larger look at what I am trying to create. There doesn't seem to be any documentation on how to make what I am looking for. (unless someone can point me in the right place I might have missed) Ultimately what I would like is to have a Blazor(server-side) application make API calls to use data in the app and then have an IdentityServer4

.NET CORE 3 Upgrade CORS and Json(cycle) XMLHttpRequest Error

此生再无相见时 提交于 2019-11-27 18:10:39
问题 I had my working project written in asp.net core 2.1 for a long time, but yesterday, I was forced to upgrade it to .net core 3.0 (due to 2.1 cannot call Dll' s which are written in 3.0 already). With that, a lot of functions were obsolete or already removed. I fixed almost all of it, but one problem with CORS. Like many people before me, I used: app.UseCors(x => x .AllowAnyOrigin() .AllowAnyMethod() .AllowAnyHeader() .AllowCredentials()); in Configure function. And services.AddCors() in

Identity UI no longer works after switching to .net core 3 endpoint routing

最后都变了- 提交于 2019-11-27 07:21:14
问题 After having a hard time getting my area to show with endpoint routing i managed to fix it in this self answered thread (albeit not in a very satisfactory way) : Issue after migrating from 2.2 to 3.0, default works but can't access area, is there anyway to debug the endpoint resolution? However Identity UI doesn't show at all for me, i get redirected on challenge to the proper url but the page is blank. I have the identity UI nugget package added and, changing from mvc routing to endpoint

Where did IMvcBuilder AddJsonOptions go in .Net Core 3.0?

僤鯓⒐⒋嵵緔 提交于 2019-11-26 16:39:14
问题 I've just upgrade my ASP web API project from .Net core 2.0 to 3.0. I was using services.AddMvc() .AddJsonOptions(options =>options.SerializerSettings.ContractResolver = new DefaultContractResolver()); previously to ensure lower-casing of the serialised JSON. After the upgrade to 3.0 I get this error... Error CS1061 'IMvcBuilder' does not contain a definition for 'AddJsonOptions' and no accessible extension method 'AddJsonOptions' accepting a first argument of type 'IMvcBuilder' could be