To download the .NET SDKs for application build and deployment navigate to the Download .NET SDKs for Visual Studio Microsoft web site
Tag Archives: ASP.NET Core
Could not create an instance of type ‘Microsoft.AspNetCore.Http.HttpContext’
The new version of dotnet core cannot handle the HttpContext in the MVC model. An unhandled exception has occurred while executing the request. System.InvalidOperationException: Could not create an instance of type ‘Microsoft.AspNetCore.Http.HttpContext’. Model bound complex types must not be abstract or value types and must have a parameterless constructor. Alternatively, set the ‘HttpContext’ property to …
Continue reading “Could not create an instance of type ‘Microsoft.AspNetCore.Http.HttpContext’”
Add identity into an ASP.NET Core 2.1 MVC project and maintain full control of the Identity UI
To maintain full control over the Identity UI in an ASP.NET Core 2.1 MVC project, scaffold the identity using the Windows version of Visual Studio 2017. Scaffold the Identity Right click the web application project and select Add, New Scaffolded Item… On the left side of the Add Scaffold dialog select Identity, and click the Add button …
Add jQuery DataTables grid to an ASP.NET Core MVC web application
ASP.NET does not provide sortable, searchable tables. jQuery DataTables is a popular way to display user-friendly data in an ASP.NET Core MVC web application. Set up the environment Add the System.Linq.Dynamic.Core NuGet package to the web application Add the JsonOptions to the Startup.cs file using Newtonsoft.Json.Serialization; Add the AddJsonOptions to the services.AddMvc() section in the ConfigureServices() method of the Startup.cs file .AddJsonOptions(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver()); Add …
Continue reading “Add jQuery DataTables grid to an ASP.NET Core MVC web application”
Error unprotecting the session cookie in an ASP.NET Core MVC application.
The new ASP.NET Core MVC framework automatically displays a message for the user to accept the application’s privacy policy. The default message is “Use this space to summarize your privacy and cookie use policy.” No cookies are saved in the user’s browser until they click the Accept button. Even after accepting the terms, if the browser …
Continue reading “Error unprotecting the session cookie in an ASP.NET Core MVC application.”