简体   繁体   English

ASP.NET MVC IIS 7.5

[英]ASP.NET MVC IIS 7.5

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#”%>

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),它们是:

  1. 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. 如果无法编译包含ProiectLicenta.MvcApplication的程序集或项目,则ASP.NET将无法找到其中包含的任何类或其他实体。 Solution: correct all compiler errors and try again. 解决方案:更正所有编译器错误,然后重试。

  2. The class ProiectLicenta.MvcApplication is not explicitly declared with the correct access specifier. ProiectLicenta.MvcApplication类未使用正确的访问说明符显式声明。 Remember, classes declared like 请记住,类声明为

    class MyClass { ... } class MyClass {...}

    are private. 是私人的。 You'll probably want to change the declaration to 您可能希望将声明更改为

    public class MyClass { ... } 公共类MyClass {...}

  3. You are deploying your site and not including the assembly (DLL) which defines the type ProiectLicenta.MvcApplication . 您正在部署站点,而不包括定义类型ProiectLicenta.MvcApplication的程序集(DLL)。 Correct your deployment process and try again. 更正部署过程,然后重试。

The Global.asax file cannot find the code-behind class MvcApplication in namespace ProiectLicenta. Global.asax文件在名称空间ProiectLicenta中找不到代码隐藏类MvcApplication。 Search your solution and find the ProiectLicenta.MvcApplication class. 搜索您的解决方案并找到ProiectLicenta.MvcApplication类。 If you cannot find the class in your solution maybe it is in an external dll that you need to add to the project. 如果您在解决方案中找不到该类,则可能是您需要添加到项目中的外部DLL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM