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>
It's simpler than that actually. Simply run this on Nuget: Install-Package Microsoft.AspNet.Web.Optimization.WebForms
Bundling and minification can be turned on simply by setting the debug attribute to false in web.config.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With