.NET Core SDK versions – which to uninstall?

First of all, this is the page I find the most useful to understand the complicated versioning of .NET CORE: https://github.com/dotnet/core/blob/master/release-notes/download-archive.md Then, something that you might already know but that was unclear to me at some point: there is a different versioning between runtimes and SDK and it’s sometime complicated to follow. When you install … Read more

How to use bind-value and bind-value:event on a custom component Blazor

Yes Blazor supports 2 way binding. It works with EventCallbacks (which must be triggered) and default uses name convention based Events e.g.: {PropertyName}Changed. Also you can override this naming convention @bind-{Prop}:event=”{EventCallbackName}”. In your code example you are just overriding this default Event name, never triggering it. In your code you have 2 issues: You MUST … Read more

Is ViewData the new standard over ViewBag for ASP.Net 5 (core)?

Both are still valid. There is no specific guidance on the docs.asp.net github project. Although there is this discussion on docs.asp.net issues. That links through to a comment from one the product team which says: “Since ViewData (Dictionary) look-ups far out-perform ViewBag (dynamic) invocations, the last is probably the best choice.” So I’d say it … Read more

Asp.net Core Identity Use AspNetUserClaims or AspNetRoleClaims?

+——————+——————+ | Table | Description | +——————+——————+ | AspNetUsers | The users. | | AspNetRoles | The roles. | | AspNetUserRoles | Roles of users. | | AspNetUserClaims | Claims by users. | | AspNetRoleClaims | Claims by roles. | +——————+——————+ A role is something assigned to a user. Eg. Jane is an admin. A … Read more

Set dummy IP address in integration test with Asp.Net Core TestServer

You can write middleware to set custom IP Address since this property is writable: public class FakeRemoteIpAddressMiddleware { private readonly RequestDelegate next; private readonly IPAddress fakeIpAddress = IPAddress.Parse(“127.168.1.32”); public FakeRemoteIpAddressMiddleware(RequestDelegate next) { this.next = next; } public async Task Invoke(HttpContext httpContext) { httpContext.Connection.RemoteIpAddress = fakeIpAddress; await this.next(httpContext); } } Then you can create StartupStub class … Read more

WindowsCryptographicException: Keyset does not exist

The problem was resolved by adding IIS_IUSR group. From this link Add group IIS_IUSR: The problem was that the Permissions for the Private Key of the Certificate in the Windows Certificate Store did not have the IIS_IUSRS group set to allow read access. Right click certificate -> All Tasks -> Manage Private Keys -> Add … Read more