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

Best Practice to Add a Slider Option in ASP.Net Core Web Application

I am creating a simple web application using ASP.Net Core 2.0 in Visual Studio 2017 with razor pages.  I am looking to add a simple slider control to the MVC Views when editing my data model.  I am not...

View Article


Newtonsoft.Json JObject.ToString() Out of Memory exception

Hello: I have the following piece of code to get a JSON string public static string ReturnResults(Results results) { dynamic JObject = new JObject(); JObject.success = results.success;...

View Article


.net core and old dotner version compatibility

can we use old library which developed with .net v4.0 in .net core project?if possible then what steps are involved to make it compatible?

View Article

Type Discriminator Configuration ASP.NET Core Web API

For a polymorphic Web API endpoint. Is there a way to configure the type discriminator?I only found a solution with a JsonConverter. But the problem is the framework behaves then a bit different. E.g....

View Article

ASP.NET Core Razor page - refresh calculated field?

I come from the old ASP.NET WebForms and I have a question on the Razor Pages. Since ASP.NET Web Core Razor Pages are rendered on the server how would you do a simple calculated field that is...

View Article


Creating checkboxes dynamically

I have a asp.net core 2.0 app. I have an employee entity that I need to display checkboxes for in the view. The problem is that I need to do this dynamically, meaning because number of employees vary,...

View Article

Validation on a modal bootstrap dialog

Hi there,I'm just starting with asp.net core and I try to build an app, where I have an modal login form.How can I handle server side validation and validation errors, which are easy to use in...

View Article

Compression at method level??

https://docs.microsoft.com/en-us/aspnet/core/performance/response-compression?tabs=aspnetcore1xenables compression for all methods..How would I do compression only at a method level?

View Article


Howto debug asp.net app with local source from github e.g....

Having a working asp.net app. Now trying to replace one of the official bundled asp.net components with local clone of project from github. E.g....

View Article


Where is my project.json?

I'm building a small asp.net core 2.0 with razor pages. I want to target framework 4.6.1 to use some libraries. All examples in google point to modify the project.json but I can't find this file in my...

View Article

Why is SignInManager.HasBeenVerifiedAsync in Asp.Net identity returning false?

Reached wits end with this.I'm trying to automate the process of two factor authentication in Asp.Net identity so that we don't challenge users for a security code every time.Currently, the code looks...

View Article

Logging Debug and Trace Events with Serilog

I'm still learning .NET and .NET Core, and I'm struggling a little bit with logging. So I was hoping someone can point me down the right path....I'm implementing Serilog in my .NET Core 2.0.0 web...

View Article

Compress a string (gzip) and write to Response

Let's say I have a large string that I want write to the Response Body. I can use a sample like this one below:var largeString = System.Text.Encoding.UTF8.GetBytes("A very large string content"); await...

View Article


Decrypt String From Within ConfigureServices

I'm still (slowly) learning .NET and .NET Core, and have run into a scenario that I'm hoping someone can shed some light on for me...My web app uses a password when authenticating with an external...

View Article

Using Serilog LoggingLevelSwitch

I'm still new to .NET Core and struggling a little bit with logging. I'm using Serilog for to perform my logging operations. I can get things to log and all that, but what I'd like to do is to be able...

View Article


Mixing Cookie Auth and JWT auth in same controller (dual auth)

HiI'm working on an ASP Core 2.0 project that contains in the same controller both API actions returning JSON and actions returning views for simplicity.I implemented the dual auth considering the...

View Article

ASP.NET Core MVC Product Database with Multiple Prices

I am upgrading one of my sites from WebForms to MVC Core. Would you please give me some advice on how to create their database? Here is some example code from the .VB file behind the Rabbit Bikes...

View Article


Validate integer in viewmodel

I have a form that has an int input but I can't seem to validate it from the browser like I can with strings.My stringinput I just use this:[StringLength(90, ErrorMessage = "{0} must be at least {2}...

View Article

System.IO.FileNotFoundException when loading a nuget package from a full .NET...

Hello,I have an ASP.NET Core Web Application running on the .NET Framework (not running on .NET Core).  I have a class library running on the full .NET Framework (not .NET Core).  This library has a...

View Article

Sum, Count and Average on lambda on view

Since EF Core has no Scaffolding for Views how do i solve this?using System; using System.Collections.Generic; namespace Design.Models {    public partial class Categories    {        public...

View Article
Browsing all 9386 articles
Browse latest View live


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