How to publish website made in Visual Studio?

Asked

Viewed 3,473 times

5

I created a MVC site in Visual Studio 2017.

I want to know how to generate the necessary files for the site to work and in which folder I should include them.

  • 1

    Italo, do you need to know how you host from scratch, or how you generate the files to be published? I couldn’t understand it properly. I can help you on the issue of compiling the project, if it’s from scratch I can be studying and helping you.

  • can be from scratch. the difference is that I will not hire a hosting plan, I will use in my local network by my IP

  • 2

    Possible duplicate of IIS mount server on PC at home

  • I saw the content of the other question and it will help me a lot, I changed the question to the doubts that I have and that are not there.

1 answer

5


To publish a website in Visual studio 2017

Right-click on your project and then click Publish publicando site no visual studio

Then choose a Folder and give a path to the folder or leave the pattern and then click Publish

Opções de deploy

To publish in iis goes on C:\inetpub\wwwroot create a folder and copy the entire contents of the publishOutput folder to this folder

Create website on IIS

Adicionando um novo site no iis

Configure the site name, the folder path you created in wwwroot and the port if you need to change( remember that you may need to open the firewall) and then click ok

Configurando iis

  • how I choose the door I want to use?

  • as access to iis (that last image that Oce posted)?

  • I did everything as it is in the two posts (in this and in what was indicated to me). The site is live, but instead of showing the page, it shows a list of the files within the folder

  • 1

    So there’s something wrong with your site, by default iis doesn’t allow listing the directory, just if you change this setting, now if you copied all the contents of the deploy folder into the iis folder, was to show the site or any other error except listing the directory. Take a look at the folder to see if it’s all right, Web.config, if it’s MVC check to see if you have the Global.asax file

  • 1

    Thanks for the help, you solved my question about the settings. I’ll do some more tests tomorrow and anything else I create another question about the iis being listing the files. hug

Browser other questions tagged

You are not signed in. Login or sign up in order to post.