SharpPDF for ASP.net core 2.2.x - sharppdf

I am trying to use SharpPDF with Asp.net core 2.2, I have "Install-Package HtmlRenderer.PdfSharp -Version 1.5.0.6", but when I try to access that page within my application that uses SharpPDF I get "Could not load file or assembly 'HtmlRenderer, Version=1.5.0.6" is this because SharpPDF does not support core?

Related

Upload IFormFile using Refit in .Net Core 3.1

I am using Refit current stable version in .Net Core 3.1 application and want to call an API from MVC application with IFormFile property in request model. I have added Multipart attribute at endpoint declaration. I don't want to replace IFormFile with anything else as I have used this across entire project.
Any solution for this please?

Unity PerRequestLifetimeManager for AspNet Core

The Unity DI Container has an extension for ASP.NET MVC (based on the older .NET Framework) that includes PerRequestLifetimeManager. This allows you to have one instance of an object that has the lifetime of one http request.
I am building an ASPNET Core MVC project and would like to use Unity, but there does not seem to be an equivalent to the PerRequestLifetimeManager in the Unity.Microsoft.DependencyInjection extension. Is anyone aware if such a thing exists?

No authenticationScheme was specified, and there was no DefaultChallengeScheme found Core 3.1

I have a WEB API application written in C# with .NET Core 3.1 that uses Windows Authentication. It builds and runs fine locally, but fails when it is deployed. The error is:
No authenticationScheme was specified, and there was no DefaultChallengeScheme
The error also tells me that I should define it in startup.cs in services.AddAuthenication. This is the line from my startup.cs:
services.AddAuthentication(IISDefaults.AuthenticationScheme)
I tried adding the nuget for Microsoft.AspNetCore.Server.IISIntegration but that made no difference.
Any ideas?

Want a common EnterpriseLibrary for .NET Core MVC (common database file)

Currently, I am learning .NET Core and updated my site from ASP.NET MVC to ASP.NET Core MVC.
In ASP.NET MVC, I used Microsoft.Practices.EnterpriseLibrary for handling the database related tasks. But when I used this library in .NET Core, I got this error:
FileNotFoundException: Could not load file or assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.SqlDatabaseTransientErrorDetectionStrategy.IsTransient(Exception ex)
Can anyone help me to get the example of all types of SQL operations with Enterprise Library and RetryPolicy? I want to create a database common file from where I can do all SQL operation

Is IdentityService available in ASP.NET Core 2 Release?

I have ASP.NET Core created using MVC template with individual authentication.
In ASP.NET Core 1.1 ApplicationDbContext was used for identity.
Then in Core 2 Preview they added IdentityService instead, so I modified my project to use it.
But now after Core 2 Release I see they returned back to use ApplicationDbContext, how it was in Core 1.1.
So when I open project I get a lot of errors:
Should I install some Nuget? But I see only version 1.0 Preview for IdentityService:
Maybe I should return back and use ApplicationDbContext for identity instead?
UPDATE: Just found on GitHub: ASP.NET Core Identity as a service

Resources