HTTP Error 500.31 - ANCM Failed to Find Native Dependencies - asp.net-core

I upgraded an existing application from asp.net core web API 2.0 to 3.1. When I run the application locally, application runs fine without any errors, but when I deployed the application to the same server where the 2.0 application was running, I got an error saying "ANCM failed to find Native dependencies".
Below is the screen shot:
From the provided link:
https://dotnet.microsoft.com/download/dotnet-core/3.1
I was able to find out that I need to install .net core 3.1. I am not sure if I need to install on my server:
ASP.NET Core Runtime 3.1.3
OR
SDK 3.1.201
I already have few 2.1 applications running on the server so I don't want the older applications to stop working if I upgrade to 3.1 . I have IIS installed on the server. Its a Microsoft windows NT version 6.2 DataCenter edition terminal server and my application that I am trying to deploy is .net core 3.1
I just wanted to know whether I should install ASP.NET Core Runtime 3.1.3 or SDK 3.1.201
and installing any of these on the server wont affect the applications that are running on 2.0 .net core framwork.
any help will be apprecaited.

Each .NET Core will define which version it uses and will use that SDK or runtime. Installing another SDK or runtime will not impact previously installed versions.
If your just hosting and not doing any development on the server then you only need to install the runtime. If any development will be taking place you will need the SDK.

Related

Update .NET Core 3.1.5 on my server Windows Server 2012 R2

I installing the Hosting Bundle 3.1.4 on my server Windows Server 2012 R2, which includes the .NET Core Runtime and IIS support. Now, it's available ASP.NET Core Runtime 3.1.5 and I want update my server.
Should I install only the runtime "ASP.NET Core Runtime 3.1.5" or again "the Hosting Bundle 3.1.5"?
ASP.NET Core Runtime 3.1.5 has IIS runtime support (ASP.NET Core Module v2) version 13.1.20142.5
ASP.NET Core Runtime 3.1.4 has IIS runtime support (ASP.NET Core Module v2) version 13.1.20114.4
If you want all work well together, and use lastest stable stack, uninsall Hosting Bundle 3.1.4 , install Hosting Bundle 3.1.5
Reference: https://dotnet.microsoft.com/download/dotnet-core/3.1
Let's see (tip: Open image in new tab for bigger screenshot)
and

Is the .NET Core SDK required for runtime?

I am setting up a Ubuntu machine to deploy a Asp.Net MVC Core app according to the instructions here. In it, it asks for the .NET Core SDK to be installed.
If my server is meant to just run the web application, is it necessary to install the SDK?
Also, if my app is developed in .NET Core 3.0 in Visual Studio, is it ok to have it in a .NET Core 3.1 runtime?
Runtime will be enough to run deployed application https://dotnet.microsoft.com/download/dotnet-core/3.1
In fact you don't even have to do that. Because you can also Publish self-contained package
https://learn.microsoft.com/pl-pl/dotnet/core/deploying/#publish-self-contained
Which will carry all resources needed for runnint your applicaiton on target OS
v3.1 runtime should support your application built in v3.0
From docs;
Install the SDK (which includes the runtime) if you want to develop
.NET Core apps. Or, if you only need to run apps, install the runtime.
If you're installing the runtime, we suggest you install the ASP.NET
Core runtime, as it includes both .NET Core and ASP.NET Core runtimes.
So you do not have to install SDK if you only need to run apps.
You need to install same runtime version as your project (SDK) version

.NET Blazor Build error

I have tried to run the out of the box Blazor application to try out C# WebAssembly. I am running into issues when trying to run it different ways. I have also tried to hack the runtimeconfig.json according to this https://github.com/dotnet/cli/issues/7543
Running IIS Express
Running BlazorApplication1
The program '[42032] dotnet.exe' has exited with code -2147450749 (0x80008083).
Running in command line
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.0.0-preview3-25512-01' was not found.
- Check application dependencies and target a framework version installed at:
\
- Alternatively, install the framework version '2.0.0-preview3-25512-01'.
You need to have the 2.1 preview of the .net core framework installed for Blazor to work: download here

deploying asp.net mvc4 app with EF 5.0

I am pretty new to asp.net mvc development. I have developed an asp.net mvc4 app targeting .NET 4.0 and using EF 5.0 for database connection. Now I want to deploy this app in a Windows 2008 server with IIS 7.5. What are the things I need to make sure that are installed in the server for this application to work properly?
Thanks!
Only two: .NET 4.0 and optionally MVC 4. You can avoid installing MVC 4 if you include binaries in your deployment package.
EF5 you standard .NET 4.0 and for sure you have reference to it, so all needed binaries will be in deployment package
Download MS Web Platform Installer 4.6 if you haven't already on the new Windows 2008 server.
http://www.microsoft.com/web/downloads/platform.aspx
Search for 'Recommended' in the top right search box.
Select and install 'Recommended Server Configuration for Hosting Providers'.
This will install all SQL drivers etc (probably too much in fairness, but in fewer steps) that you need to run .net 4.5 apps, and make it possible to deploy using Web Deploy.
The details of the process can be found in this article
http://www.orcsweb.com/blog/gabe/how-to-install-webdeploy-on-windows-server-2012/

How can you get a .NET 4.5 website to run on IIS6?

I've got an old Windows 2003 server running IIS 6, and I chose .net 4.5 for my latest web app. Problem is I can't get it to run on the server...
.NET 4.0 framework is installed. I've run aspnet_regiis and deployed the website. I gave it it's own application pool. But I'm getting the following error:
The 'targetFramework' attribute in the <compilation> element of the Web.config
file is used only to target version 4.0 and later of the .NET Framework (for
example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute
currently references a version that is later than the installed version of the
.NET Framework. Specify a valid target version of the .NET Framework, or install
the required version of the .NET Framework.
I saw the requirements for .NET 4.5 as requiring Windows Server 2008 or later, but I'm seeing lots of posts with people just needing to configure the routing for MVC4 so it seems like this should be possible.
So any ideas what I need to do in order for this to work?
EDIT: The strange thing is we are using an ASP.NET Web API site that works just fine... but that should require .net 4.5...
.Net 4.5 cannot be installed on Windows Server 2003.
Instead, you should use MVC 4.0 on .Net 4.0, which will work fine.