problem with hosting asp.net core 2.1 in plesk cpanel? - asp.net

I am having asp.net core 2.1 project and your plesk supports upto only .Net framework 4.6.2. And I am not able to host my project.It always ends up with following error
HTTP Error 502.5 - Process Failure
What I have tried:
In Plesk , I clicked on Hosting Settings and untick Microsoft ASP.NET so that .NET core gets No Managed Code Application Pool.
And then trying to test my project .. But everytime I ends you will above error.
I am trying to do this for 3 days :)

As mentioned on Plesk's Knowledge base, it'll depend on your version of Plesk - it'll require 17.8 onwards.
ASP.NET Core 2.x
In Plesk for Windows
According to release notes, ASP.NET Core 2.0 is supported since March
6, 2018 on Plesk Onyx 17.8 only. Check how to upgrade to the latest
version.
It is possible to install required components with the Autoinstaller
(Plesk > Tools & Settings (Server) > Updates & Upgrades > Plesk
hosting features > .NET Core Runtime), and then upload your
application manually into hosting using FTP, Visual Studio and etc.
As for other versions, they are not shipped with Plesk, but can be
used on a server with Plesk.
The required version can be installed manually using the installer
available on .NET Core main website.
After installation, version can be verified by executing the following
command in the Command prompt:
dotnet --version
In Plesk for Linux Download and install manually all the required packages from https://www.microsoft.com/net/download/linux

Related

Install the IIS ASP.NET Core module via Powershell

In a continuous deployment scenario I'm trying to deploy a .Net core web application on IIS starting from a clean machine. During the automated tasks I download and execute the dotnet-install.ps1 script that is responsible of installing the .Net runtime in the user's %LocalAppData%\Microsoft\dotnet folder.
Now I need to provide IIS with the AspNet Core Module that allows it to run .Net core applications, but I found that the only way to install it is to download the .Net core runtime from the official web site and install it.
Instead, what I would like to do is to preserve the way I install the .Net core runtime via the dotnet-install.ps1 script (which automatically checks for upgrades and handles all the installation) while being able to install only the IIS AspNet Core Module.
Is there any installation method to support me installing only the IIS AspNet core module?
Thanks

503 “Service Unavailable” error for all apps after installing .NET Core 2.2 Runtime & Hosting Bundle for Windows

I'm developing an angular 7 application with ASP.NET CORE 2.2 and when I deploy it in IIS 8.5 which is a Windows Server 2012 R2, all the web applications host in IIS gives 503 Service Unavailable error and error goes away when I uninstall .NET Core 2.2 Runtime & Hosting Bundle
When I check the event view it shows me the following error:
A listener channel for protocol 'http' in worker process '<ProcessId>' serving application pool '<ApplicationPoolName>' reported a listener channel failure.
Tried online and it was not success anyone has any solution?
It took me more than one day to find a solution for this. Before you install ASP.NET Core/.NET Core: Runtime & Hosting Bundle (latest versions), you need to ensure you have installed Microsoft Visual C++ 2015 Redistributable. in the system.
Installation(ASP.NET Core/.NET Core: Runtime & Hosting Bundle) doesn't say anything if Microsoft Visual C++ 2015 Redistributable is missing.
This helped to fixed the issue that I had. Hope this will help you.

.NET Core runtime/sdk versioning with .NET 461?

I'm getting more and more confused with .NET Core's SDK and runtime versioning, and I doubt I'm the only one. I want to get a few things straight.
I've created an ASP.NET Core application targeting .NET 4.6.1 - it hits 4.6.1 libraries and Net Standard libraries. Recently I made the switch from project.json to csproj as part of the VS2017 rollout. The 1.1.1 runtime came out with SDK 1.0.1 a few weeks ago, which I downloaded (https://github.com/dotnet/core/blob/master/release-notes/download-archive.md).
dotnet --version gives me the correct SDK (1.0.1)
However, typing "dotnet" into cmd I see "Version : 1.1.0". Shouldn't this say 1.1.1? My Programs and Features shows that the 1.1.1 runtime is installed.
Fast forward to hosting my app: I install the latest windows server hosting package to host on IIS according to https://learn.microsoft.com/en-us/aspnet/core/publishing/iis, that is 1.0.4&1.1.1. Installing this on my server installs "Microsoft .NET Core 1.0.4 & 1.1.1 - Windows Server Hosting" and "Microsoft .NET Core 1.0.4 - Runtime". Shouldn't it have also installed the 1.1.1 runtime? It works, so maybe it's not necessary.
Ultimately, my questions are the following:
Does the runtime version matter when targeting .NET 4.6.1 at all?
Is runtime just used to run the AspNetCoreModule for the IIS to kestrel reverse proxy?
Will installing new Windows Hosting packages break existing projects already running on the servers?
Does .Net's netstandard packages (such as MVC) versioning correspond in any way to the runtime version, or is it just regular semantic versioning? The newest versions of most "Microsoft.AspNetCore.X" packages are 1.1.1.
I'm in the same situation, compiling my ASP.NET Core app against the full .NET Framework (4.5.2 in my case) and deploying it on IIS. Hopefully I can help.
When using the full .NET framework, you need to install the SDK on your developper machine to compile, but to deploy it on an IIS server you don't need any .NET Core runtime installed at all. On my IIS server, I just need .NET Framework installed and then I'm installing the "Windows Server Hosting" as suggested here: https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.0.4-download.md with a command line that won't even install any .NET Core on my server:
DotNetCore.1.0.4_1.1.1-WindowsHosting.exe OPT_INSTALL_LTS_REDIST=0 OPT_INSTALL_FTS_REDIST=0
This installation is super quick and is just deploying the minimum amount of files IIS needs to run your .NET Core app, which is mainly the aspnetcore.dll. I don't even have a directory "C:\Program Files\dotnet" (so no runtime or sdk) on my server and my app is working fine.
So, I would say:
no, it doesn't matter, it won't run against any .NET Core runtime
no, AspNetCore.dll is a C++ module (https://github.com/aspnet/AspNetCoreModule)
I don't see how it could break anything
at the moment, when you add a Nuget package in your ASP.NET Core app, its versionning seems quite independant to me, that's why Microsoft is now providing metapackage to help people using the proper set of Nuget package (https://andrewlock.net/what-is-the-microsoft-aspnetcore-metapackage/)
Regarding:
However, typing "dotnet" into cmd I see "Version : 1.1.0". Shouldn't
this say 1.1.1? My Programs and Features shows that the 1.1.1 runtime
is installed.
I'm wondering the same thing and can't figure out where this is coming from, maybe it's just the version of the "dotnet" command line tool that is package with the SDK 1.0.1, but I can't prove it.

Visual Studio 2017 Installation of "ASP.NET and web development"

I've downloaded Visual Studio with --layout option, and installed it.
Installation was successful with warning, as below,
The product failed to install the listed workloads and components due to one or more package failures.
Incomplete workloads
.NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26208.0)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26208.0)
Azure development (Microsoft.VisualStudio.Workload.Azure,version=15.0.26208.0)
Mobile development with JavaScript (Microsoft.VisualStudio.Workload.WebCrossPlat,version=15.0.26208.0)
Node.js development (Microsoft.VisualStudio.Workload.Node,version=15.0.26208.0)
Incomplete components
.NET Core 1.0 - 1.1 development tools (Microsoft.NetCore.ComponentGroup.Web,version=15.0.26208.0)
.NET Core 1.0.1 development tools (Microsoft.Net.Core.Component.SDK,version=15.0.26208.0)
Container development tools (Microsoft.VisualStudio.Component.DockerTools,version=15.0.26208.0)
Git for Windows (Microsoft.VisualStudio.Component.Git,version=15.0.26208.0)
Visual Studio Emulator for Android (Component.Android.Emulator,version=15.0.26208.0)
There errors were listed in log file.
Every time I modify the Installer and try to install web components, doesn't work.
I've tried to restart computer, restart the installer.
Nothing works.
After some digging,
I found a solution.
Try to install Visual Studio with setting temp and %temp% folder to short path, like d:\temp.
Step 1 : open cmd with administrator privileges (to ignore administrative privileges error).
Step 2 : execute command - set tmp="d:\temp"
Step 3 : execute command - set temp="d:\temp"
Step 4 : execute vs_community.exe with whatever --layout option you want.

In Microsoft Azure .net Framework is not recognized in IIS Application Pool

I am trying to make some ASP.NET website work on Azure.
I have a SQL Server running on the same machine, meaning minimum .net 3.5 is working on it. Also I installed version 4.0 and 4.5 while 4.0 shows up in registry and 4.5 won't show up. Also I can't re-install 4.5 because it is already installed.
In IIS only the .net CLR version shows up, there is no option to make my websites use any other .net Framework version.
When I try to register them using command line : aspnet_regiis.exe -ir
I get the following error on my 2012 Windows Server:
This option is not supported on this version of the operating system. Administr
ators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Win
dows Features On/Off" dialog, the Server Manager management tool, or the dism.e
xe command line tool. For more details please see http://go.microsoft.com/fwlin
k/?LinkID=216771.
also it shows:
Finished installting ASP.NET ...
But nothing shows up in IIS. What options do I have left? I don't know any.
Here my selected version in IIS, 4.0
Here what It shows for the apppools
http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45
This has all details. Basically in server you need to use "Add Roles". So check whether 4.5 is enabled in the "Web server (IIS)" role.

Resources