Questions tagged [asp.net-core-1.1]

Use this tag for questions specifically related to ASP.NET Core 1.1, in addition to using the 'ASP.NET Core' tag.

See the tag asp.net-core for more information or What's new in ASP.NET Core 1.1?

298 questions
9
votes
2 answers

Custom Configuration Binder for Property

I'm using Configuration Binding in an ASP.NET Core 1.1 solution. Basically, I have some simple code for the binding in my ConfigureServices Startup section that looks like…
jceddy
  • 1,257
  • 1
  • 10
  • 15
8
votes
1 answer

View sql queries generated by EF Core

Is there anyway to see what SQL query EF Core is generating? (ASP .Net Core 1.1)
7
votes
2 answers

Override default indexes in AspNetCore.Identity tables

I'm developing a multi-tenant application in ASP.NET Core 2.1. I'm utilizing AspNetCore.Identity.EntityFrameworkCore framework for user management. I want to add a unique index combining NormalizedName with TenantId in Role Table. Also, in the user…
Aruna
  • 1,752
  • 3
  • 20
  • 41
7
votes
1 answer

Downloading byte[] of generated pdf using nodeservices in Asp.net Core 1.1

I'm trying to download a nodeServices generated pdf file that is in the form of byte array. here is my original code: [HttpGet] [Route("[action]/{appId}")] public async Task Pdf(Guid appId, [FromServices] INodeServices…
Anan Raddad
  • 193
  • 2
  • 6
7
votes
4 answers

Specify a format for "asp-for" HTML Tag (ASP.NET Core)

In an ASP.NET Core project I have to display a (readonly) date in a specific format (say "dd/mm/yyyy HH:MM")
serge
  • 9,891
  • 17
  • 84
  • 142
7
votes
0 answers

How to ignore key unprotect errors

My application often fails with failed to unprotect session cookie (I am using two applications with different assembly versions). Error unprotecting the session cookie. The key {hex_key} was not found in the key…
Shadow
  • 1,234
  • 2
  • 14
  • 28
7
votes
2 answers

Start a task with clean AsyncLocal state

In ASP.NET Core, I am using IHttpContextAccessor to access the current HttpContext. HttpContextAccessor uses AsyncLocal. In one situation, I am trying to start a Task from within a request, that should continue running after the request has ended…
Flavien
  • 5,647
  • 7
  • 34
  • 45
7
votes
3 answers

View Component as a Tag Helper does not get Invoked

Invoking a View Component as a Tag Helper was introduced in ASP.NET Core 1.1. (See “Invoking a view component as a Tag Helper”). But the following only returns the Test for VC part of the view. It seems that
7
votes
2 answers

asp.net core on linux with nginx routing doesn't work

I've created an ASP.NET Core MVC application and deployed it into Linux server. When I go to sitename.com browser shows up the Home/Index page without any problem. But when I try to go sitename.com/Home/Index or another controller like…
7
votes
1 answer

Override Existing Data Annotation Attribute in asp.net core 1.1

I am trying to override the RequiredAttribute in .net core and does not seem to work on asp.net core 1.1 Here is the test code public class CustomRequiredAttribute : RequiredAttribute { public CustomRequiredAttribute():base() { } …
AliK
  • 677
  • 1
  • 6
  • 23
6
votes
1 answer

Convert MailMessage to MemoryStream in .net core

I am using the .Net Core 1.2 with Amazon SES(SimpleEmail) to send the Emails(Raw Emails). Below is the working code version we have used in .net framework 4.5: public MemoryStream ConvertMailMessageToMemoryStream(MailMessage message) { …
6
votes
1 answer

Converting code from RestSharp to HttpClient

Could someone please help me convert this ASP .Net Core example (to be used in my Web Api to consume a management API from Auth0) which uses RestSharp into one using HttpClient? var client = new…
Fabricio Rodriguez
  • 2,759
  • 5
  • 33
  • 67
6
votes
1 answer

ASP.NET Core Identity impersonate specific user

Let's say I have the following roles: Admin User I want Admin role to impersonate specific user account with User role, but without knowing that specific user account's password. Admin should be able to impersonate any user from the application…
6
votes
3 answers

The "CheckFileSystemCaseSensitive" task failed unexpectedly, Could not load file or assembly 'System.IO.FileSystem

To my Visual Studio 2017, ASP.NET Core, MVC web project I just added the Microsoft.TypeScript.MSBuild NuGet package v2.3.1, and simultaneously updated my ASP.NET Core assemblies from 1.0.* to 1.1.1. Now suddenly when I build my project I get the…
Doug Kent
  • 737
  • 1
  • 8
  • 17
6
votes
2 answers

Glimpse diagnostics platform which is full compatible to ASP.NET Core

I used Glimpse on the old ASP.NET MVC5 stack and liked it very much cause it gives a pretty and detailed representation of nearly all important data for debugging purpose. Sadly, its not compatible with ASP.NET Core (yet). I tried to install the…
Lion
  • 11,498
  • 13
  • 55
  • 113
1
2
3
19 20