简体   繁体   中英

Publish from VS 2017 doesn't include views/web.config which throws 500 error

As the title says, I publish my MVC/.Net 4.6.2 app to my Server 2012R2 server and it throws a 500 error. If I manually copy my Views/web.config everything works again.

Am I missing an option to get it to deploy?

In this situation you all you have to do is make sure that the Build Action for the web.config file is set to Content. I have found that sometimes files that you need don't get set like this automatically within Visual Studio.

To make this change, find the file in the Solution Explorer. Select the file. Then in the Properties pane, set the Build Action to Content by choosing Content form the dropdown next to the property label.

Glad this helped you out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM