I have follwing erorr after I have published site in IIS 7.5 and i don't hnow what to do
我在IIS 7.5中发布网站后,我发现了以下错误,我不知道该怎么做
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 'ProiectLicenta.MvcApplication'.
分析器错误消息:无法加载类型'ProiectLicenta.MvcApplication'。
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="ProiectLicenta.MvcApplication" Language="C#" %>
第1行:<%@ Application Codebehind =“Global.asax.cs”Inherits =“ProiectLicenta.MvcApplication”Language =“C#”%>
2 个解决方案
#1
-1
The Global.asax file cannot find the code-behind class MvcApplication in namespace ProiectLicenta. Search your solution and find the ProiectLicenta.MvcApplication class. If you cannot find the class in your solution maybe it is in an external dll that you need to add to the project.
Global.asax文件在名称空间ProiectLicenta中找不到代码隐藏类MvcApplication。搜索您的解决方案并找到ProiectLicenta.MvcApplication类。如果您在解决方案中找不到该类,则可能是您需要添加到项目中的外部DLL。
#2
2
The solution you accepted is incomplete. For the sake of others researching this problem in the future, I'll elaborate.
您接受的解决方案不完整。为了将来研究这个问题的其他人,我将详细说明。
Literally, this means that ASP.NET couldn't locate the type 'ProiectLicenta.MvcApplication'.
从字面上看,这意味着ASP.NET无法找到“ProiectLicenta.MvcApplication”类型。
This can happen for a number of reasons. In order of likelyhood (imho, of course), they are:
这可能由于多种原因而发生。根据可能性(当然是imho),它们是:
-
You are ignoring an error when building your site. If the assembly or project that contains
ProiectLicenta.MvcApplication
can not be compiled, then ASP.NET will not be able to locate any classes or other entities therein contained. Solution: correct all compiler errors and try again.您在构建站点时忽略了错误。如果无法编译包含ProiectLicenta.MvcApplication的程序集或项目,则ASP.NET将无法找到其中包含的任何类或其他实体。解决方案:更正所有编译器错误,然后重试。
-
The class
ProiectLicenta.MvcApplication
is not explicitly declared with the correct access specifier. Remember, classes declared likeProiectLicenta.MvcApplication类未使用正确的访问说明符显式声明。请记住,类声明为
class MyClass { ... }
class MyClass {...}
are private. You'll probably want to change the declaration to
是私人的。您可能希望将声明更改为
public class MyClass { ... }
公共类MyClass {...}
-
You are deploying your site and not including the assembly (DLL) which defines the type
ProiectLicenta.MvcApplication
. Correct your deployment process and try again.您正在部署站点,而不包括定义类型为ProiectLicenta.MvcApplication的程序集(DLL)。更正部署过程,然后重试。
#1
-1
The Global.asax file cannot find the code-behind class MvcApplication in namespace ProiectLicenta. Search your solution and find the ProiectLicenta.MvcApplication class. If you cannot find the class in your solution maybe it is in an external dll that you need to add to the project.
Global.asax文件在名称空间ProiectLicenta中找不到代码隐藏类MvcApplication。搜索您的解决方案并找到ProiectLicenta.MvcApplication类。如果您在解决方案中找不到该类,则可能是您需要添加到项目中的外部DLL。
#2
2
The solution you accepted is incomplete. For the sake of others researching this problem in the future, I'll elaborate.
您接受的解决方案不完整。为了将来研究这个问题的其他人,我将详细说明。
Literally, this means that ASP.NET couldn't locate the type 'ProiectLicenta.MvcApplication'.
从字面上看,这意味着ASP.NET无法找到“ProiectLicenta.MvcApplication”类型。
This can happen for a number of reasons. In order of likelyhood (imho, of course), they are:
这可能由于多种原因而发生。根据可能性(当然是imho),它们是:
-
You are ignoring an error when building your site. If the assembly or project that contains
ProiectLicenta.MvcApplication
can not be compiled, then ASP.NET will not be able to locate any classes or other entities therein contained. Solution: correct all compiler errors and try again.您在构建站点时忽略了错误。如果无法编译包含ProiectLicenta.MvcApplication的程序集或项目,则ASP.NET将无法找到其中包含的任何类或其他实体。解决方案:更正所有编译器错误,然后重试。
-
The class
ProiectLicenta.MvcApplication
is not explicitly declared with the correct access specifier. Remember, classes declared likeProiectLicenta.MvcApplication类未使用正确的访问说明符显式声明。请记住,类声明为
class MyClass { ... }
class MyClass {...}
are private. You'll probably want to change the declaration to
是私人的。您可能希望将声明更改为
public class MyClass { ... }
公共类MyClass {...}
-
You are deploying your site and not including the assembly (DLL) which defines the type
ProiectLicenta.MvcApplication
. Correct your deployment process and try again.您正在部署站点,而不包括定义类型为ProiectLicenta.MvcApplication的程序集(DLL)。更正部署过程,然后重试。