How to seed in navigation property?
I have several models in this Db, I am using the following seeding class,public class SeedData { public static void Initialize(IServiceProvider serviceProvider) { using (var context = new...
View ArticleReplacing IFormFile with a byte array in an POCO
Hi,I have an HTTP server with a model which has an IFormFile attribute which I want to replace with a byte array. The HTTP Client sends a PUT request with follwing content disposition...
View ArticlePrevent multiple login in Asp.Net Core 2
Good day,How do i validate security stamp to prevent multiple login from single user inAsp.Net Core 2 as there's no SecurityStampValidationInterval inIdentityOption.Thanks in advance.
View ArticleIdentity Authentication shared between two applications
Hi,I work with ASP Core 2.0I have a first web application that I call 'Master', (localhost:5000) within this application I can log inwith Identity, which generates a Cookie. it works fine.I have a...
View Articlewhat is it different between (private vs Public ) in this Code (List...
HII Use Asp.net core MVC 2 PDF for Learn asp.net core 2in this book Used Session for store List Of product in the Card. Now i have two codes with the following :first code :private List<CartLine>...
View ArticleHow can I tell to Asp.Net Core to save nuget packages on a specific folder?
On Asp.Net MVC4 when you create a project and download the nuget dependencies, it created a package.json with all the id and values for all dependencies you have installed. At the same time, a package...
View ArticleRouting: Datetime parameter passing as null/empty
The problem: Two attributes are needed for a Controller. However, one of them (datetime) goes as null.Routing:A new routing was incorporated so the Controller could receive two attributes:...
View ArticleEF Core Scaffold-DbContext table not included in the selection set
I recently upgraded to .Net Core 2.0, and I'm running into a lot of issues scaffolding an existing database. First of all, when I runScaffold-DbContext"Server=mysrv;Database=mydb;User...
View ArticleFile Not Saving
Following along on the File Upload Tutorial, the uploads aren't saving to my wwwroot folder.Any info would be great!!
View ArticleIdentityServer : redirection problem and custom claims
Hi,Following the instructions provided to implement IdentityServer, I managed to achieve the following points (my code is based on...
View ArticleRender ViewComponent as string from controller
Hi, I want to render viewcomponent as string in the controller itself. Not in the cshtml.Here is the code I'm using now but it gets me a null reference exception in the the InvokeAsyncCore inside...
View ArticleHow to Validate Security Stamp in Asp.Net Core 2
Hi guys,I've been on this for days now trying to figure out how to validate security stamp inAsp.Net Core 2 to automatically signout user from previous logins. Below is my ConfigureServices and Login...
View ArticleAlpha support - .net Core Microservices
Hi All,Great to find an active forum of people using .net core applications.I'm looking for some help and feedback on our new service we have just pushed into Alpha. We have created a platform...
View ArticleQuestions about Supporting Large file uploads
I have a project where I am required to support processing on somewhat large jpeg files. So far I have written a Filewatcher program in c# that works fine locally, but cannot seem to process the files...
View ArticleAutoMapper and IFormFile
What is a good way to map apublic class House { public string ImageUrl { get; set; } }with apublic class HouseModel { public IFormFile ImageUrl { get; set ;} }using AutoMapper? Should I change the...
View ArticleUnable to scaffold a new controller with Entity Framework Core in ASP.Net...
I'm not 100% sure this has to do with ASP.Net Core, but think so.I'm going over this tutorial on ASP.Net core , and am using VS 2017 to do so--...
View ArticleCalling SignalR hub method from Web API controller
Dear all, I'm a novice on Asp.net core. At present, I try to create a Web API with POST method to call a SignalR hub's method to broadcast the update result to all connected clients.What is the best...
View Articlebroken JSON after Serialization using EF in ASP Core2
I have those two main classes, I am trying to read the record and its related one but I am getting a broken JSON, The only way I got it to work is by using Automapper. but why is this...
View ArticleCore 2.0 WindowsIdentity current name returning IIS APPPOOL
HelloI started a Core Web Application project (VS2017) with windows authentication on a domain.When debugging, the app shows the correct user.The code is in the Startup.csWindowsIdentity currentUser =...
View ArticleHow to build ASP.NET Core project from hithub on my PC?
Hello all!Please, provide more details.Thank you.
View Article