Malekbenz

Hi, I'm MalekBenz. I author this blog, I'm FullStack Developer, create courses & love learning, writing, teaching technology. ( Javascript, C#, ASP.NET , NodeJS, SQL Server )

Publish a dotnet web application with IIS

Last time we’ve created SPA Single Page Application Create a Single Page Application with dotnet core using a dontnet command with dotnet, but how to deploy my application to production on IIS . In this post I’m going to guide you on how to do that.

Generate your application:

Run dotnet publish from your dev environment to package your application into a self-contained directory that can run on your IIS server

    $ dotnet publish
    

CMD

You got :

CMD

Create a directory and copy the publish directory :

CMD

Create a website.

Launch IIS :

CMD

Right Click on Site then click Add website

CMD

Name you website SpaApp , choose a port 8080, and select your application path e:\SpaApplication:

CMD

Click OK, make sure that your website is Running.

CMD

In the browser, navigate to http://localhost:8080 .

CMD

That’s it!.

Comments