Quantcast
Channel: ASP.NET Core
Browsing all 9386 articles
Browse latest View live

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 Article


Replacing 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 Article


Prevent 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 Article

Identity 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 Article

what 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 Article


How 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 Article

Routing: 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 Article

EF 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 Article


File Not Saving

Following along on the File Upload Tutorial, the uploads aren't saving to my wwwroot folder.Any info would be great!!

View Article


Image may be NSFW.
Clik here to view.

IdentityServer : 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 Article

Render 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 Article

How 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 Article

Alpha 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 Article


Questions 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 Article

AutoMapper 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 Article


Unable 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 Article

Calling 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 Article


broken 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 Article

Core 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 Article

How to build ASP.NET Core project from hithub on my PC?

Hello all!Please, provide more details.Thank you.

View Article
Browsing all 9386 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>