首页  >  新闻动态  > 常见问题

分析器错误消息: 未能加载类型“System.Web.Mvc.ViewPage<Mvcmode.Mvc_seo>

分析器错误消息: 未能加载类型“System.Web.Mvc.ViewPage<Mvcmode.Mvc_seo>”。

源错误:

行 1: <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Mvcmode.Mvc_seo>" %>
行 2: <%@ Import Namespace="Mvcmode"%>
行 3: <%@ Import Namespace="Mvcbll"%><%string webd = Fun.Webdirectory; string mainweburl = Fun.MainWeburl;%><!DOCTYPE HTML>
源文件: /themes/default/main/Index.aspx 行: 1
版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4494.0

原因:缺少web.config ,themes模板下面要加web.config.代码如下:

<?xml version="1.0"?>
<configuration>
	<configSections>
	</configSections>
	<appSettings>
		<add key="webpages:Enabled" value="false" />
	</appSettings>

	<system.webServer>
		<validation validateIntegratedModeConfiguration="false" />
		<handlers>
			<remove name="BlockViewHandler"/>
			<!--新加的,优先配前面的-->
			<add name="pagehtml" path="*.html" verb="GET,HEAD,POST" type="System.Web.DefaultHttpHandler" />
			<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
		</handlers>
	</system.webServer>
	
	<system.web>
		<pages validateRequest="false" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
		<controls>
			<add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" namespace="System.Web.Mvc" tagPrefix="mvc" />
		</controls>
		</pages>
 <httpHandlers>
 <!--新加的,优先配前面的-->
 <add path="*.html" verb="GET,HEAD,POST" type="System.Web.DefaultHttpHandler" validate="true" />
 <add path="*" verb="*" type="System.Web.HttpNotFoundHandler" />
 </httpHandlers>
 <!--
 Enabling request validation in view pages would cause validation to occur
 after the input has already been processed by the controller. By default
 MVC performs request validation before a controller processes the input.
 To change this behavior apply the ValidateInputAttribute to a
 controller or action.
 -->
	 <compilation>
		 <assemblies>
			 <add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
		 </assemblies>
	 </compilation>
 </system.web> 
</configuration>

 

相关文章
分析器错误
/Content/weixinlogo.jpg
香港最快最准资料提供用户体验更佳的国内Cms软件
香港最快最准资料