Posted on

How to Deploy ASP.NET Core Web API on IIS Windows Server

(Tested on windows server 2012r2)

Install the .NET Core Hosting Bundle on Windows Server

The .NET Core Hosting bundle is an installer for the .NET Core Runtime and the ASP.NET Core Module. The bundle allows ASP.NET Core apps to run with IIS.

Current version:.NET Core Hosting Bundle installer (direct download)

(for this test we installed version .Net Core 8 on win 2012r2)

Visual Studio : Publish on Folder

After creating the ASP.NET Core application in Visual Studio, we can use the Visual Studio Publish Tool to deploy and run our app. For this project, choose to publish to a folder. Choose the folder and hit “Finish”.

In the next screen, where you see the settings for this deploy, click on “More Actions” and then on “Edit”.

Select :

  • Deployment Mode : Complete
  • Target Runtime : win-x64 (for our server)
  • File Publish Options : Delete all existing files prior to publish (flagged)
  • Database : Default Connection edit (if yuu need it)

Save this configuration, control it an Publish.

Copy the contents of the folder on the IIS server to the folder dedicated to the new site.

IIS and new site

Create the site on IIS. For the Application Pool you have to use default .NET CLR Version : v4.0.

Open your browser and call up the site. You receive the “page not found” error (404).

Remember that a site that hosts only calls web api. To verify that it works you can use the controller that Visual Studio sets by default when creating a site. Then type:

https://www.mynewapisite.com/WeatherForecast

and you will get a result. The site works!

Posted on

Windows server – Active Directory – useful links

Move active directory roles from a domanin controller ti another

VERIFICARE E MODIFICARE I RUOLI FSMO DI UN DOMINIO WINDOWS

Backup Domain Controller

Aggiungere un Backup Domain Controller ad un dominio Active Directory esistente

Installing licenses for Remote Desktop

Licensing Mode for Remote Desktop Session Host is not Configured

Modalità gestione licenze di Desktop remoto non configurata

Posted on

Error “CredSSP” Error using rdp on Windows Server 2012 R2

Scenario

You are trying to connect via rdp to windows server 2012 r2 and you receive this error :

An authentication error has occurred.
The function is not supported.
Remote Computer: your hostname
This could be due to CredSSP encryption oracle remediation.

Solution

Download and install KB4103725 form Microsoft Update Catalog

After installing you need to restart the server.

Posted on

prerequisites to install veeam backup and replication

To install Veem Backup and Replication on Windows 2012 server, you need :

  1. Sql server 2014 Exprees
  2. Net Framework 3.5 (install it directly from your windows server). Necessary for Sql server Managment Studio 2014
  3. Sql server managment studio 2014
  4. From Microsoft® SQL Server® 2014 Feature Pack (https://www.microsoft.com/en-us/download/details.aspx?id=42295), you have to download and install
    1. SQLSysClrTypes.msi
    2. SharedManagementObjects.msi
  5. MICROSOFT® REPORT VIEWER 2015 RUNTIME
  6. Windows 10 Universal C Runtime

 

Posted on

Virtualizzazione for dummies

Quando accendete il vostro computer vi trovate in genere di fronte a Windows. Windows è il programma principale del computer, senza il quale il computer sarebbe una scatola vuota. Viene chiamato Sistema Operativo. Dentro a Windows avete decine di altri programmi che usate quotidianamente.

L’hardware del vostro computer (l’hard disk, la ram, il processore, etc) sono stati costruiti per ospitare un solo sistema operativo. In pratica è come comprare un motorino che quindi può trasportare solo voi. Il motorino è il computer …. voi rappresentate windows.

I SERVER ieri

I server sono grossi computer, molto potenti. Fino a qualche anno fa venivano venduti anche’essi con un sistema operativo, di solito Windows Server o Linux Server. I server eseguono diverse applicazioni molto importanti , rendendole fruibili ai client cioè ai vostri computer. Per esempio, i server ospitano i siti internet a cui vi collegate; dentro ogni server ci sono migliaia di siti internet diversi a cui si collegano milioni di utenti (Voi). Oppure ospitano tutti i file di una azienda : i file della produzione, della progettazione, della amministrazione : tutti i vari reparti aziendali trovano nel server il materiale con cui lavorare.

Per una azienda quindi il server è il computer più importante: se si rompe questo non lavora più nessuno fintanto che non viene riparato. Se si rompe un server che ospita siti internet, tutti i siti saranno irraggiungibili.

Per ovviare a queste problematiche si è pensato di dividere il carico di lavoro dei server : ogni server ospita un solo sito internet; esiste un server per i files del reparto amministrazione e un server per la progettazione, etc. Se si rompe un server, solo il servizio che stava dando verrà a mancare: le altre funzioni risultano attive sugli altri server.

Per ottenere tutto ciò ci è venuto in aiuto un miglioramento delle tecnologie hardware e il concetto di virtualizzazione.

I SERVER oggi e la VIRTUALIZZAZIONE

Oggi i server sono computer ancora più potenti rispetto al passato ed alle risorse richieste dalle applicazioni moderne. I server oggi vengono venduti senza sistema operativo : per continuare nel nostro parallelismo è come comprare un camion vuoto.

I server sono così potenti che possono tenere al loro interno decine di sistemi operativi diversi cioè di macchine che fanno azioni diverse: ognuna di queste macchine viene chiamata “macchina virtuale”. Si realizza così una netta separazione tra ambienti : ogni macchina svolge una sola funzione ben definita e “mancando” la macchina viene meno una sola funzione.

I problemi arrivano solo se …. si rompe il camion, ma anche qui ci sono delle tecniche per mitigare i disagi.