未知的服务器标记“webopt:BundleReference” [英] Unknown server tag 'webopt:BundleReference'
本文介绍了未知的服务器标记“webopt:BundleReference”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经开发使用Visual Studio 2012的Web防爆preSS在ASP.Net 4.5 Web表单。它托管在somee.com。页面加载时我得到以下错误:
在'/'应用程序的服务器错误。分析器错误说明:该请求提供服务所需资源的分析过程中出现错误。请检查下列特定分析错误详细信息并适当地修改源文件。分析器错误信息:未知的服务器标记webopt:BundleReference。源错误:
9号线:LT;%:Scripts.Render(〜/包/ Modernizr的)%>
10号线:LT; / ASP:占位符>
11号线:其中,webopt:BundleReference =服务器PATH =〜/内容/ CSS/>
12号线:其中,链接HREF =〜/ favicon.ico的相对=快捷方式图标类型=图像/ X-图标/>
13号线:其中; META NAME =视口CONTENT =WIDTH =设备宽度/>源文件:/Site.Master行:11版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.17929
解决方案
您需要确保,你必须是与您的webopt文件的具体程序集的引用。
:通常情况下,你可以通过包括web.config文件的部分中它做到这一点 <网页和GT;
<控制与GT;
<添加标签preFIX =webopt集结号=Microsoft.AspNet.Web.Optimization.WebForms命名空间=Microsoft.AspNet.Web.Optimization.WebForms/>
< /控制>
< /页>
I have developed a web form in ASP.Net 4.5 using Visual Studio 2012 for Web Express. It is hosted on somee.com. When the page loads I get the following error:
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: Unknown server tag 'webopt:BundleReference'.
Source Error:
Line 9: <%: Scripts.Render("~/bundles/modernizr") %>
Line 10: </asp:PlaceHolder>
Line 11: <webopt:BundleReference runat="server" Path="~/Content/css" />
Line 12: <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
Line 13: <meta name="viewport" content="width=device-width" />
Source File: /Site.Master Line: 11
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
解决方案
You'll need to ensure that you have a reference to the specific assembly that is related to your "webopt" files. Typically, you can do this by including it within the section of your web.config file :
<pages>
<controls>
<add tagPrefix="webopt" assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" />
</controls>
</pages>
这篇关于未知的服务器标记“webopt:BundleReference”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文