asp.net - 解析器错误消息:无法加载类型“PatronWebUserUtility.PatronWebUserMaintenance”
问题描述
我们正在尝试发布一个简单的单页 ASPX/VB.NET 应用程序,该应用程序管理数据库中的单个表并且已经碰壁了。当我们在 Visual Studio 中运行应用程序时,它运行良好。但是,在发布到我们的 IIS 服务器(使用 Visual Studio 与我们的 PC 分开)后,应用程序会收到此错误。我们从其他帖子中尝试了很多建议,但在我们的实例中似乎没有任何区别。
该应用程序配置为针对 .NET 4 构建,并且 IIS 应用程序池也设置为 .NET 4。IIS 服务器版本为 8.0,在 Windows Server 2012 v6.2 上运行。
将应用程序发布到服务器时,它会生成以下文件结构:
bin(文件夹)
-PatronWebUserUtility.dll
-PatronWebUserUtility.pdb
-PatronWebUserUtility.xml
PatronWebUserMaintenance.ASPX
网络配置
我包含以上内容是因为我不确定所有内容都按应有的方式发布,但我不知道如何验证 DLL 中实际发布的内容。我假设 ASPX.VB 页面将包含在那里,但我只是不知道。
我们在 ASP 方面完全没有经验,只是在内部没有 ASP 开发人员的情况下试图通过这个小项目一瘸一拐地完成。下面的代码块在我们的实际应用程序代码之前停止,我认为这个查询不需要,但如果您需要更多信息来帮助,请询问!
错误信息:
Parser Error Message: Could not load type 'PatronWebUserUtility.PatronWebUserMaintenance'.
Source Error:
Line 1: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="PatronWebUserMaintenance.aspx.vb" Inherits="PatronWebUserUtility.PatronWebUserMaintenance" MaintainScrollPositionOnPostback="true"%>
Line 2:
Line 3: <!DOCTYPE html>
Source File: /patronwebusermaintenance/PatronWebUserMaintenance.aspx Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.36480
ASPX 页面标题:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="PatronWebUserMaintenance.aspx.vb" Inherits="PatronWebUserUtility.PatronWebUserMaintenance" MaintainScrollPositionOnPostback="true"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Patron Web User Maintenance</title>
</head>
ASPX.VB 页面标题:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Data.OleDb
Imports System.Web.UI
Public Class PatronWebUserMaintenance
Inherits System.Web.UI.Page
网络配置:
<configuration>
<appSettings/>
<connectionStrings>
<add name="PatronWebTestConnectionString" connectionString="Data Source=SQLSERVER;Initial Catalog=PatronWebTest;Integrated Security=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/>
<httpRuntime/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
<system.webServer>
<defaultDocument enabled="true">
<files>
<add value="PatronWebUserMaintenance.aspx" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
解决方案
推荐阅读
- jquery - 我如何向除前四个项目之外的所有项目添加类
- excel - 未找到 VBA 点。重点在图片中
- github - 是否有任何选项可用于在只有有限存储库访问的 Azure Devops 上创建服务连接?
- laravel-5 - 更新了数据库中的图像存储,但不是 laravel 中的文件夹
- ios - 从 NSKeyedUnarchiver.unarchiveObject 到 PropertyListDecoder().decode 的错误
- r - 如何在图中表示函数的效率
- javascript - 是否可以在没有活动电子表格的情况下每天使用时间驱动触发器运行函数?
- mysql - 在 Laravel 中使用不同的查询左连接
- c# - 如何使用 Microsoft Graph API 发送邀请电子邮件
- python - 在列表中搜索确切的字符串