An Avanade Blogging Community

Welcome to An Avanade Blogging Community Sign in | Join | Help
in Search

Avanade.Employees.JoeF.Blog::Title

Fixing Unknown Server Tag ASP:WebPartManager Error

For the past week or so I've been working on a web part POC for my current project.  It didn't take long before I started receiving the following warning:

Generation of designer file failed: Unknown server tag 'asp:webpartmanager'.

This warning actually kept my designer file from auto-generating.  I'm still not exactly sure what the cause was, but the fix I used (and I'm hoping this is a temporary workaround until I can put more time into researching it) is to add the following registration to the top of your page:

<%@ register assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
namespace="System.Web.UI.WebControls.WebParts" tagprefix="asp" %>

Adding this code will cause the runtime to look in the System.Web.UI.WebControls.WebParts namespace for any controls with the tag prefix "asp".  This does not replace previous registrations using the "asp" tag prefix, so you can still reference controls such as "asp:textbox".

As I said, I do not know why I had to add this.  It should be done automatically when System.Web.dll is registered in machine.config.  At any rate, this works for now.  I hope it may help out someone else.  If anyone knows of a more permanent fix, or the root cause of the problem, please let me know!

Published Tuesday, May 01, 2007 3:59 PM by joef
Filed Under: ,

Comments

No Comments
Anonymous comments are disabled
©2006 Avanade Inc. All Rights Reserved.