Deployment of ASP.NET Core and Vue CLI via IIS

Viewed 486

I currently work on a project which aims to let users manipulate data from SQL server on web browsers. I used ASP.NET boilerplate with Vue as the frontend, and the template could be found at https://aspnetboilerplate.com/ ...

I've successfully built both backend and frontend and they are in different folders, one is Vue, one is Abp. Vue has listened on localhost:8080 and aspnet core are worked on localhost:21020. in aspnet core, it used Cors() so the Vue page could load services from the backend and display information stored in SQL server if I run ASP.NET Core in Visual Studio firstly.

The thing is, I have to run the backend and then Vue pages could display information. If backend is not running, Vue pages would be the blank page. Also, I could only see it on my laptop, "localhost:8080". I'm confused about the deployment of the project. How could I deploy them? shall I deploy the frontend, backend, or both of them? I only tried to deploy the frontend (a "dist" folder obtained by running command yarn build) via IIS but only a blank page was displayed. Could anyone help me with it?

1 Answers

The thing is, I have to run the backend and then Vue pages could display information. If backend is not running, Vue pages would be the blank page

  • there might be error on your frontend/vue pages (you can check on console errors), my guess would be is that you are trying to access your backend while loading the vue pages.

Also, I could only see it on my laptop, "localhost:8080". I'm confused about the deployment of the project. How could I deploy them? shall I deploy the frontend, backend, or both of them?

  • deploy both of them, and deploy it separately, for vuejs deployment you can just search it on google keyword would be "deploy vue app to iis". As for the backend its pretty straightforward deployment.

After deploying your backend, you must take note that localhost:21020 will be changed to the specified url in the IIS in which you have deployed.

Related