问题描述
嗨!
现在,我知道你在想什么(不是另一个解析器错误!)。但我的情况很独特。 (不,真的!;-))我可以使用你的帮助。让我告诉你错误是什么:
'/'应用程序中的服务器错误。
---------------------------------------------- ----------------------------------
解析器错误
描述:在解析为此请求提供服务所需的资源期间发生错误。请查看以下特定的解析错误详细信息并相应地修改源文件。
解析器错误消息:无法加载类型'TestCert'。
来源错误:
第1行:<%@ Page 语言 = C# AutoEventWireup = true CodeBehind = TestCert.aspx.cs 继承 = TestCert %>
第2行:
第3行:< !DOCTYPE html PUBLIC - // W3C // DTD XHTML 1.0 Transitional // EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd >
源文件:/TestCert.aspx行:1
----- -------------------------------------------------- -------------------------
版本信息:Microsoft .NET Framework版本:2.0.50727.3625; ASP.NET版本:2.0.50727.3634
情况是我有一堆.aspx和https后面的.aspx.cs文件,所有文件都在一起。没有解决方案文件,也没有项目文件(不是我的想法)。
到目前为止我尝试了什么:
1.项目文件名为TestMMW,因此整个命名空间位于命名空间TestMMW下。我尝试关闭命名空间(您在上面看到)。错误。
2.我尝试重新打开命名空间。错误。
3.我注意到它在.Net和ASP.NET的第2版下运行,所以我安装了Visual Studio 2008(确定 - 我通常在VS 2010下工作),在那里编译确保.Net版本为2.0,并将其FTP过来。错误。
我为接下来的尝试而感到茫然。你能帮帮我吗?
谢谢!
Hi!
Now, I know what you're thinking ("Not another parser error!"). But my situation is unique. (No, really! ;-) ) I could use your help. Let me tell you what the error is:
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 'TestCert'. Source Error: Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestCert.aspx.cs" Inherits="TestCert" %> Line 2: Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Source File: /TestCert.aspx Line: 1 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3634
The situation is I have a bunch of .aspx and .aspx.cs files behind https, all in a lump together. There is no solution file and no project file (not my idea).
What I've tried so far:
1. The project file is called TestMMW, so the whole thing was under the namespace TestMMW. I tried taking the namespace off (which you see up above). Error.
2. I tried putting the namespace back on. Error.
3. I noticed that it's running under version 2 of .Net and ASP.NET, so I installed Visual Studio 2008 (to be sure - I generally work under VS 2010), compiled under there, making sure the .Net version was 2.0, and FTPd it over. Error.
I'm at a loss for what to try next. Can you help me, please?
Thanks!
这篇关于分析器错误:无法加载类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!