【发布时间】:2020-10-17 16:34:28
【问题描述】:
我在 IIS 版本 10、Windows 10 操作系统中托管了我的 Web 应用程序。我的 Web 应用在 Visual Studio 中运行完美。
当我在 IIS 中托管我的应用程序并在“C:\inetpub\wwwroot\WATER\view\User\AddCustomer.aspx”位置浏览我的 Web 表单时,我收到了错误:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The file '/view/MasterPage/AdminMaster.master.cs' does not exist.
Source Error:
Line 1: <%@ Master Language="C#" AutoEventWireup="true" CodeFile="AdminMaster.master.cs" Inherits="AdminMaster" %>
Line 2:
Line 3: <!DOCTYPE html>
Source File: /view/MasterPage/AdminMaster.master Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4075.0
母版页文件目录路径为 :: "C:\inetpub\wwwroot\WATER\view\MasterPage"
此 Web 表单 AddCustomer.aspx 中的母版页路径是::
<%@ Page Title="" Language="C#" MasterPageFile="~/view/MasterPage/AdminMaster.master" AutoEventWireup="true" CodeBehind="AddCustomer.aspx.cs" Inherits="DENTAL.view.User.AddCustomer" %>
我尝试将母版页的路径更改为 ::
<%@ Page Title="" Language="C#" MasterPageFile="~/AdminMaster.master" AutoEventWireup="true" CodeBehind="AddCustomer.aspx.cs" Inherits="DENTAL.view.User.AddCustomer" %>
再来一次
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/AdminMaster.master" AutoEventWireup="true" CodeBehind="AddCustomer.aspx.cs" Inherits="DENTAL.view.User.AddCustomer" %>
但没有成功。我也无法从其他目录浏览任何网络表单,到处都出现相同的错误。
请在 IIS 中查看我的应用程序的目录结构图像。请帮忙。谢谢!!!
【问题讨论】: