RenderAsPdf failing in background service - serenity-platform

Im facing a similar issue as this: https://github.com/volkanceylan/Serenity/issues/2819#issuecomment-339887478
But the fix does not work with Asp.Net core version. Any clues?

With .net core version you can use Dependency
!!! Add using Microsoft.AspNetCore.Http; on top

Related

NU1108 error while installing DotLiquid with .Net Core

I have ASP.NET Core 2.2 i am trying to install dotliquid using nuget
Install-Package DotLiquid -Version 2.0.298
but getting error
Does DotLiquid support .NET Core 2.2 ?
Update: Actually, I can reproduce your problem.
It seems to be because your solution or project is also called DotLiquid. When I create a new ASP.NET Core 2.2 web application called DotLiquid, just as you have in your screenshot, then I also get the cycles error:
Edit: This is apparently by design.
However, if I create an application with any other name, it installs fine.
Original answer
I just created a new ASP.NET Core 2.2 web application, and installed the latest version of DotLiquid - version 2.0.314 - and it installed successfully. Try that version instead of 2.0.298.

How to create report(e.g. PDF,Excel,Word) in ASP.NET Core 1.0?

I want to create report(e.g. PDF,Excel,Word) in ASP.NET Core 1.0,
but NPOI and OpenXML is not support ASP.NET Core.
There is an issue for .NET Core support for OpenXML (https://github.com/OfficeDev/Open-XML-SDK/issues/65). Some work has to be done before it is ready. Someone who had your demand as well ported it to .NET Core and published his project on GitHub (https://github.com/xrkolovos/Open-XML-SDK-for-NET-Platform-Standard). I have not tried it myself, but it may be worthwile to try.
UPDATE:
Current releases of OpenXML support .NET Core. Therefore the second GitHub project is obsolete now.
For PDF PdfReport.Core could be a solution. I can confirm that it works under netcoreapp1.1. It also should be able to export to Excel, XML and CSV (NOT tested by me).
Please check my answer here:
https://stackoverflow.com/a/42023039/1719087
There is a CI build that works with .Net Core 1.1 at
https://github.com/OfficeDev/Open-XML-SDK
the specific nuget package is at this feed:
https://dotnet.myget.org/F/open-xml-sdk/api/v3/index.json
If your application is fine to run on windows only, then using ASP.NET Core with the full .net framework let you use NPOI and OpenXML. With this approach you can start now with the new Microsoft web framework in the hope that NPOI or OpenXML will support .NET Core in the near future.

Migrating Options to ASPNET Core RC2

I have a application built on ASPNET Core RC1, which is using string typed configuration Options, and I am trying to migrate to RC2.
But the following code is not working anymore:
services.Configure<AppSettings>(Configuration.GetSection("AppSettings"));
According to ASPNET Core docs, it was supposed to converted this way:
services.Configure<AppSettings>(Configuration);
But this is also not working. The only overload available for the Configure extensions method accepts only a Action as parameter, and I don't want to have to parse the entire configuration myself.
What would be the right way to migrate this code?
Try adding Microsoft.Extensions.Options.ConfigurationExtensions package.

MVC4 Razor URL resolution do not work

I have upgraded my project from VS2010 MVC3 to VS2012 MVC4 recently and found out that new Razor URL resolution feature do not work do not work.
For example I have fav icon
and ~/ path is not automatically resolved by Razor. If I use old style(MVC3) Url.Content resolver everything works fine.
If I create new MVC4 project then paths are resolved successfully. I think that something is left not enabled when VS2012 upgraded my project but can't find what. Any ideas?
I have found teh problem by myself. It seems the project was upgraded that it still use MVC3, the project MVC version was not changed automatically.

Is there a version of ELMAH for .NET 4?

I'd like to use ELMAH in an ASP.NET MVC 2 application running on .NET 4, but according to the project hosting site on Google code, it only supports .NET 1.1 and 2.0.
Is there a .NET 4 version of ELMAH already, or do I have to download the source and update whatever breaks myself?
Elmah works perfectly fine for ASP.NET 4.0.
However, there are a few tricks in getting it setup to work perfectly on an MVC website.
I have recently starting blogging about this topic so be sure to check out my blog series on logging in MVC. The first article covers getting Elmah set up and running for MVC using all the tricks that you can find about it on StackOverflow.
There is a link to downloadable code at the end of the article. Hope that helps.
http://dotnetdarren.wordpress.com/
I am using .NET 4.0 and I dont about a new version.... but I am using the elmah 1.1 and it works....:)..You may have to change source though to add custom fields or log additional values..which is bit of a pain...but get started here
Well it's open source nothing should prevent you from recompiling it using the .NET 4.0 framework.
This link has some information about running pre .NET4 web apps and .NET4 web apps in a server.
EDIT:
Actually you won't need to recompile ELMAH. According to this and this article the In-Process side by side execution should do the trick.
I had the same question so I downloaded the 1.1 src, opened it up in visual studio 2010, changed the project to target 4.0 and rebuilt it. I then dropped the dll in my ASP.NET MVC 2.0 app and it has worked fine.