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

Deploy Xamarin Android App to Google Play Store

Xamarin App basic configuration

Visual Studio Configuration to Debug

AndroidManifest.xml

Open in editor xml (using Visual Studio)

android:debuggable=”true”

Project Propreties

  • Set use Fast Deployment (in the image below is not set)
  • Select apk


Visual Studio Configuration to Play store

AndroidManifest.xml

Open in editor xml (using Visual Studio)

android:debuggable=”false”

Project Propreties

  • Remove use Fast Deployment
  • Select bundle

Posted on

Mecdata – Sviluppo siti web

MECDATA è un’azienda italiana che offre una vasta gamma di servizi IT, tra cui lo sviluppo e la progettazione di siti Web. Un team di sviluppatori web esperti che possono creare siti Web personalizzati che soddisfano le esigenze specifiche dei loro clienti. I servizi di sviluppo siti web di MECDATA includono:

  • Progettazione e sviluppo di siti Web: MECDATA può progettare e sviluppare un sito Web da zero oppure può collaborare con te per riprogettare un sito Web esistente.
  • Soluzioni e-commerce: MECDATA può realizzare un sito e-commerce che ti permette di vendere online i tuoi prodotti o servizi.
  • Sistemi di gestione dei contenuti (CMS): MECDATA può installare e configurare un CMS per il tuo sito web, che ti consentirà di gestire facilmente i contenuti del tuo sito web.
  • Ottimizzazione per i motori di ricerca (SEO): MECDATA può aiutarti a ottimizzare il tuo sito web per i motori di ricerca, in modo che abbia maggiori probabilità di essere trovato dai potenziali clienti.
  • Manutenzione del sito web: MECDATA può fornire una manutenzione continua al tuo sito web, in modo che sia sempre aggiornato e sicuro.

I servizi di sviluppo di siti Web di MECDATA sono convenienti e affidabili e vantano una solida esperienza di successo. Ci impegnano a fornire ai nostri clienti siti Web di alta qualità che soddisfino le loro esigenze specifiche.

Se stai cercando un’azienda per sviluppare il tuo sito web, MECDATA è un’ottima opzione. Abbiamo l’esperienza e la competenza per creare un sito Web che ti aiuterà a raggiungere i tuoi obiettivi aziendali.

Ecco alcuni dei motivi per cui dovresti scegliere MECDATA per sviluppare il tuo sito web:

Esperienza: MECDATA dispone di un team di sviluppatori web esperti che hanno una comprovata esperienza di successo.

Competenza: MECDATA ha esperienza in tutti gli aspetti dello sviluppo di siti web, dalla progettazione e sviluppo al SEO e alla manutenzione.

Conveniente: i servizi di sviluppo di siti Web di MECDATA sono convenienti e competitivi.

Affidabilità: MECDATA è un’azienda affidabile che si impegna a fornire ai propri clienti siti Web di alta qualità.

Contatta MECDATA oggi per ottenere un preventivo gratuito per il tuo progetto di sviluppo del sito web.


Articolo scritto da Bard il 21/11/2023
Posted on

Retrieve resources in c# Windows Forms .Net Application

Scenario

You have a library (dll) with one or more image and you want to use those image in your application.

Load Resource from application

Consider having a library called : myLibrary.dll with some class inside with Namespace mylibrary.

In your bapplication you can get to the resources by referencing the assembly :

Assembly assem = Assembly.LoadFrom("myLibrary.dll");

You can enumerate the resource files

string[] resNames = assem.GetManifestResourceNames();
if (resNames.Length == 0)
Console.WriteLine(" No resources found.");

foreach (var resName in resNames)
Console.WriteLine(" Resource 1: {0}", resName.Replace(".resources", ""));
foreach (var resName in resNames)
Console.WriteLine(" Resource 2: {0}", resName);

And this will be the output :

Resource 1: myLibrary.Properties.Resources
Resource 2: myLibrary.Properties.Resources.resources

The replace is necessary because the real resource name is the first one (without .resources)

Now, If you have an image called myBitmap.png in your resources, you can load it, using ResourceManager

ResourceManager rm = new ResourceManager("myLibrary.Properties.Resources",
assem);

and finally

Object myres = rm.GetObject(myBitmap);

Load Resource inside Library

To get resource from a class inside your resource library, defined a new class, for example myClass and reference own assembly :

rm = new ResourceManager("myLibrary.Properties.Resources",
typeof(myClass).Assembly);

At this point you can withdraw the resource as seen above.

Posted on

Microsoft MFA : Attivato o Applicato

Multi Factor Authentication (MFA)

Microsoft raccomanda di usare la multi factor authentication per gli amministratori globali del tenant. Se non si esegue questa operazione, dopo 60 giorni dall’ultimo sollecito di Microsoft , il tenant viene disattivato.

Attenzione : non è sufficiente attivatre l’autenticazione a 2 fattori … bisogna anche usarla.

Attivato o Applicato

Il problema è che l’attivazione non è sufficiente. In effetti dopo aver attivato l’utente , questo deve anche effettuare un login con la MFA : a questo punto lo stato dell’utente passa da Attivato a d Applicato e lo stato è valido secondo Microsoft.

Non dovete avere Global Admin con MFA in stato Attivato ma esclusivamente in stato Applicato.

Posted on

Ricevere la fattura per la sottoscrizione all’Apple Developer Program

Gli sviluppatori italiani sanno che la sottoscrizione all’Apple Developer Program viene eseguita sul sito Apple senza che possa essere ricevuta la fattura. Questa abbonamento, ancora oggi, non può essere acquistato nella parte business del sito Apple, quello dedicato alle aziende.

Se avete necessità di ricevere la fattura, Apple mette a disposizione il numero 800 915 911. A questo numero un operatore vi guiderà nei passi necessari per ottenere la fattura comprovante il vostro acquisto. Per eseguire la procedura dovete solo avere i dati del vostro ordine alla Apple.

Posted on

Tenant Microsoft 365 configuration

Posted on

Microsoft-Office365 disabiliatare l’autenticazione a 2 fattori

Quando viene creato un nuovo Tenant Microsoft365, l’autenticazione a 2 fattori è attivata a default. Per disattivarla (o attivarla), entrate sul vostro tenant tramite il portale di Azure (https://portal.azure.com).

Selezionate “Azure Active Directory”-

Selezionate “Proprietà”

In basso trovate il link “Gestisci le impostazioni predefinite per la sicurezza” da cui arrivate a disabilitare/abilitare