Solved

How to remove an errant WebPart from a SharePoint site

Posted on 2012-04-05
6
712 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
  • 4
  • 2
6 Comments
 
LVL 31

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 31

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

792 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