无法加载类型“site._Default" [英] Could not load type 'site._Default'

查看:21
本文介绍了无法加载类型“site._Default"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在调试时使用 VS8 和 C# 开发了一个简单的网站,一切正常,然后我使用 Ctrl + Shift + B 构建,当我将网站上传到 Godaddy 服务器时,它显示下一个错误:

I have develop a simple website using VS8 and C# when I debug everything works fine, then I built using Ctrl + Shift + B and when I upload the site to a godaddy server it display the next error:

解析器错误说明:解析服务此请求所需的资源时出错.请查看以下特定的解析错误详细信息并适当修改您的源文件.

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.

解析器错误消息:无法加载类型testDemo._Default".

Parser Error Message: Could not load type 'testDemo._Default'.

源错误:

第 1 行:<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="testDemo._Default"%>第 2 行:
第 3 行:

Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="testDemo._Default"%> Line 2:
Line 3:

我发现的一个解决方案是删除部分 Inherits="testDemo._Default",但在调试时它不执行 "Page_Load(object sender, EventArgs e)".

A solution I found is removing the part Inherits="testDemo._Default", but when debuging it does not execute the "Page_Load(object sender, EventArgs e)".

有谁知道是什么导致了这个错误?

Does anyone knows what is causing this error?

推荐答案

只需将 Line1 上的CodeBehind"更改为CodeFile"

Simply change "CodeBehind" to "CodeFile" on your Line1

这篇关于无法加载类型“site._Default"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆