How to redirect HTTP to HTTPS in IIS? Open Web.config file and add following rewrite rule: <?xml version=”1.0″ encoding=”utf-8″?> […]
Updated on Kisan Patel
How to redirect URL from WWW to non-WWW in IIS? Open Web.config file and add following rewrite rule: <?xml […]
Updated on Kisan Patel
This sample uses the JsonIgnoreAttribute to exclude a property from serialization. public class Account { public string FullName { get; […]
Updated on Kisan Patel
How to serialize a class object into JSON format using the JsonConvert class. JsonConvert.SerializeObject(item) Note: you have to include the […]
Updated on Kisan Patel
Install the Microsoft.AspNetCore.Mvc.NewtonsoftJson package. Update Startup.ConfigureServices to call AddNewtonsoftJson. services.AddSignalR() .AddNewtonsoftJsonProtocol( options => options.PayloadSerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver() ); Source: https://stackoverflow.com/questions/37832165/signalr-net-core-camelcase-json-contract-resolver […]
Updated on Kisan Patel
Problem: How to remotely connect to .net core self hosted web api? External Network Access to Kestrel and IIS Express […]
Updated on Kisan Patel
Problem: How to find a string included between two characters? Looping through Regex Matches How to use Regex to get […]
Updated on Kisan Patel
Problem: How to Define multiple Foreign Key for the Same table in Entity Framework Code First. Solution: To achieve what […]
Updated on Kisan Patel
Add the below code in StartUp.Configure public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, FinOsDbContext context) { …. var cultureInfo […]
Updated on Kisan Patel
Problem: I am using Entity Framework and having a problem with getting parent and child data that causes self-referencing loop. […]
Updated on Kisan Patel