C# '中的服务器错误/';应用程序分析器错误

C# '中的服务器错误/';应用程序分析器错误,c#,asp.net,iis,localhost,C#,Asp.net,Iis,Localhost,问题是,当我从VisualStudio运行项目时,它工作正常,但当我从localhost运行应用程序时,我得到以下错误 分析器错误 描述:解析服务此请求所需的资源时出错。请查看以下特定的解析错误详细信息,并适当修改源文件 Parser Error Message: The virtual path '/assets/masters/homepage.master' maps to another application, which is not allowed. Source Error:

问题是,当我从VisualStudio运行项目时,它工作正常,但当我从localhost运行应用程序时,我得到以下错误

分析器错误

描述:解析服务此请求所需的资源时出错。请查看以下特定的解析错误详细信息,并适当修改源文件

Parser Error Message: The virtual path '/assets/masters/homepage.master' maps to another application, which is not allowed.

Source Error: 


Line 1:  <% @ Page Language="C#" MasterPageFile="/assets/masters/homepage.master" Title="Content Page 1" %>
Line 2:  
Line 3:  <asp:Content ContentPlaceHolderID="Extra_dNet_Code" Runat="Server">

Source File: /WebSite4/default.aspx    Line: 1 
解析器错误消息:虚拟路径“/assets/masters/homepage.master”映射到另一个应用程序,这是不允许的。
源错误:
第1行:
第2行:
第3行:
源文件:/WebSite4/default.aspx行:1
尽管VisualStudio中没有错误,但它显示了几个警告

以下文件/assets/masters/homepage.master中给出了错误

<% @ Page Language="C#" MasterPageFile="/assets/masters/homepage.master" Title="Content Page 1" %>


如何修复此问题?

您是否尝试过此方法?您需要更正此页/资产/masters/homepage.master。使其与以下内容相对应。~/,../但不起作用。听起来好像您已经在本地IIS中将子目录配置为应用程序。是的,我已经在wwwroot文件夹下创建了一个子目录,并放置了该站点。如何解决这个问题?