I'm creating an application which uses the RazorPDF nuget package for creating PDF document. When using this on a local development pc everything works fine but when I deploy on a server, I always get the standard error: "Error. An error occurred while processing your request."
Do I need to change properties in my project to make the nuget package work on a server except the normal way to deploy or has any one got experience with this?
Related
I upgraded a Windows Server 2016 to Windows Server 2022.
The upgrade defaulted to a fresh install in which no setting, programs and customizations were retained.
After the upgrade I pointed IIS's Default Website to the directory that was originally the IIS root on Win 2016.
Modules were not carried forward in the upgrade. When I attempt to Add Managed Module it returns the following error:
There was an error while performing this operation.
Details:
Cannot execute a program. The command being executed was 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe' /noconfig /fullpaths
#"C:Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\<number>\<number>.cmdline".
On the original computer (which was backed up) IIS's managed modules do not return an error. I also add that I can access the original computer if there is a need.
Is there a way I can reset this functionality or correct this error?
--------------- Update
At the Server level the options works well. The problem only appears to be at the website level.
--------------- Update
The error is thrown when I add a C# program in a directory under the website.
As a POC I added a simple "Hello World" program and the Add Managed Module returns the error I shared.
I can confirm that csc.exe is present in the directory.
Any ideas how to resolve this issue? It seems (not sure) that the problem is happening because the code is failing to compile.
Any ideas on how to resolve this would be appreciated.
I am working with report in ASP.Net Core using AspNetCore.Reporting to create report. When I executed the report in windows machine it work fine. However if i executed on linux machine I got this error.
An error occurred during local report processing.;The definition of the report '/var/task/Reports/Report.rdlc' is invalid. An unexpected error occurred in Report Processing. Unable to load shared library 'kernel32.dll' or one of its dependencies.
Note: I deploy the application using serverless in AWS and aspnetcore as the runtime.
Can anyone help to solve my problem?
It doesn't work on linux and that package hasn't received an update since 2018.
There are other alternatives such as syncfusion pdf (paid) or Rotativa that creates pdf files from MVC views, rotativa uses wkhtmltopdf (open source and cross-platform).
At the end I use Itext/Itextsharp as alternative to create PDF. The functionality to create PDF is open source
I created a Web API project using the default ASP.NET Core Web Application (.NET Framework) template and then published to local folder using VS.
Now if I call dotnet application.exe in the console, I receive the following error:
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found
I have found in this answer and this issue on github, that the actual problem is a missing emitEntryPoint property. All is fine, except that my project.json already has "emitEntryPoint": true
What else can cause this error?
Once you publish the application and have a .exe file, you don't need to use dotnet anymore. The application is compiled!
Just run application.exe by double-clicking it, or launching it from the console.
Make sure you install the correct version of ASP Net Core in the server.
Here is the download link:
https://dotnet.microsoft.com/download/dotnet-core
We ran in the same problem building our app in CI. Apparantly a reference towards another unittest project slipped in. This Created the error at hand.
I am using ASP .NET MVC 4 with Entity Framework 4.5
I downloaded the nuget something to be able to export my data pro PDF and found one called RotativaW7. The project is working normal but I try to check in the project to publish to TFS and is giving the following error message:
ERROR: Multiple errors occurred during the operation, the first of which is displayed below. A full error list is available in the Output Window.
..\packages\RotativaW7.1.5.4\RotativaW7.1.5.4.nupkg: Unable to write data to the transport connection: The cancellation of an existing connection was forced by the remote host.
nuget:
Install-Package RotativaW7 -Version 1.5.4
Could anyone help me solve this problem?
The nuget package contains an .exe, are you sure TFS allows you to check in executable files?
I have a working application using SignalR hubs with a single web instance. I need to extend the functionality to a web farm. So I am trying to use the SignalR.Redis package. After I import that package with Package Manager in VS 2010 I start getting the following 500 error in the webpage/client:
[22:53:21.615] GET http://localhost:2936/signalr/hubs [HTTP/1.1 500 Internal Server Error 31ms]
Before importing the SignalR.Redis package that call works fine. I have changed no actual code yet. Just imported the package. Any ideas?
Thanks.
Scratch this question. I started over, updating all SignalR packages in VS 2010 and everything works. Must have been a outdated package or something. Thanks.