Solved

How to remove an errant WebPart from a SharePoint site

Posted on 2012-04-05
6
714 Views
Last Modified: 2012-04-05
I am working on a SharePoint site that was restored to a development machine from a test server. Whenever I try to compile and build a new Web Part that I am working on from Visual Studio, I get the following error (in the browser Window):

Line 1:  <%@ Register TagPrefix="WpNs3" Namespace="<ProjectName>.WeatherMap" Assembly="<ProjectName>, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0521399ff9cdd4c1"%>

The ENTIRE error page looks like this:

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: Could not load file or assembly '<ProjectName>, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0521399ff9cdd4c1' or one of its dependencies. The system cannot find the file specified.

Source Error:


Line 1:  <%@ Register TagPrefix="WpNs3" Namespace="<ProjectName>.WeatherMap" Assembly="<ProjectName>, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0521399ff9cdd4c1"%>
Line 2:  <%@ Register TagPrefix="WpNs2" Namespace="<ProjectName>.GenericStatus" Assembly="<ProjectName>, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0521399ff9cdd4c1"%>
Line 3:  <%@ Register TagPrefix="WpNs1" Namespace="<ProjectName>.Forecast" Assembly="<ProjectName>, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0521399ff9cdd4c1"%>
 

Source File: /cnic/default.aspx    Line: 1

Assembly Load Trace: The following information can be helpful to determine why the assembly '<ProjectName>, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0521399ff9cdd4c1' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456
0
Comment
Question by:Rahsaan-Pringle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 32

Expert Comment

by:Jamie McAllister MVP
ID: 37812478
Append the querystring argument "?contents=1" to the page url. Use the options that are displayed to delete the webpart from the page.
0
 

Author Comment

by:Rahsaan-Pringle
ID: 37812527
That was certainly useful, thanks. It didn't solve the problem (this is the SharePoint install from hell). I did try it, and I rebooted IIS after deleting some of the web parts that were showing as having errors.
0
 
LVL 32

Accepted Solution

by:
Jamie McAllister MVP earned 500 total points
ID: 37812561
So what's the remaining errors?

From looking at the message, your page references features and components that have not been installed on this other server. Just the content database has been moved over?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Rahsaan-Pringle
ID: 37812640
Attached, you will find a PDF with screenshots of what I am seeing. You say I might not have features activated? That's odd, because the site runs fine BEFORE I run the code in debug mode in Visual Studio. Even the web part in question (known as the WeatherMap) looks fine until I try to debug.
Visio-Drawing3.pdf
0
 

Author Comment

by:Rahsaan-Pringle
ID: 37812774
I DID have some features that were not activated, but none of them had to do with the "WeatherMap" Web Part. Following your lead, I activated them all, and the error went away. Now, I'm reloading the site to make sure it works.
0
 

Author Closing Comment

by:Rahsaan-Pringle
ID: 37812827
Moral of the story: Even if you don't think your Web Part is connected to a feature, it might be.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question