我已经完成了简单的 asp.net web 应用程序项目,编译它,并尝试在本地 IIS 上进行测试。我已经创建了虚拟目录,将其映射到物理目录,然后将所有必要的文件放在那里,包括带有所有 .dll 的 bin 文件夹在项目设置的构建部分中,输出路径是 bin\ 所以当我尝试浏览我的应用程序时,我得到了:
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: Could not load type 'AmeriaTestTask.Default'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AmeriaTestTask.Default" %>
Line 2:
Line 3: <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>
Source File: /virtual/default.aspx Line: 1
已阅读类似的问题帖子,解决方案是将输出路径设置为 bin\,但这对我的项目来说是默认的。