简体   繁体   English

无法读取web.config文件的Asp.net核心Web应用程序

[英]Cannot read web.config file Asp.net core web application

I am trying to run some sample code for ASP.NET Core and Angular 2 . 我正在尝试为ASP.NET Core和Angular 2运行一些示例代码。

I cloned the project from https://github.com/PacktPublishing/ASPdotNET-Core-and-Angular-2 and changed the sdk version in the global.json to the current version I have installed (1.0.0-preview2-1-003177). 我从https://github.com/PacktPublishing/ASPdotNET-Core-and-Angular-2克隆了该项目,并将global.json中的sdk版本更改为我已安装的当前版本(1.0.0-preview2-1- 003177)。 When I run the web application I get the following error page: 当我运行Web应用程序时,我得到以下错误页面:

在此输入图像描述

I grepped the project looking for the config file path but came up with nothing. 我在项目中寻找配置文件路径,但没有提出任何建议。 I also contacted support but they aren't helpful. 我也联系了支持,但他们没有帮助。

Does anybody know how to change the config file path? 有谁知道如何更改配置文件路径?

You must open hidden .vs folder in root of your solution folder, then find applicationhost.config file in the config folder. 您必须在解决方案文件夹的根目录中打开隐藏的.vs文件夹,然后在config文件夹中找到applicationhost.config文件。 ... and change ......并且改变

<virtualDirectory path="/" physicalPath="......" 

to the proper path. 走向正确的道路。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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