MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Webpart Error

  Date: Oct 13    Category: MOSS    Views: 1910

I was asked to migrate a Webpart developed MOSS 2007 to Share Point 2010. I have
to code for the webpart. I created a new webpart in VS2010 with the same name as
in 2007, and copied the code from 2007 to 2010. When i build it, was successful
and deployed it and it was also successful. When i go to my site and check it in
the webparts section in site setting i can see the webpart name, the wsp file.
But when i try to open the webpart it gives me en error.
An unexpected error has occurred.

I have attached the code file too.

And when i check the Log Files , i could gather this data
07/23/2011 14:23:52.02 w3wp.exe (0x125C) 0x03D8
SharePoint Foundation Monitoring nasqMedium
Entering monitored scope (Request
07/23/2011 14:23:52.02 w3wp.exe (0x125C)
0x03D8 SharePoint Foundation Logging Correlation Data xmnvMedium
07/23/2011 14:23:52.03 w3wp.exe (0x125C) 0x03D8 SharePoint
Foundation Logging Correlation Data xmnvMedium
07/23/2011 14:23:52.08 w3wp.exe (0x125C) 0x03D8 SharePoint
Foundation Monitoring b4lyHigh Leaving Monitored
Scope (EnsureListItemsData). Execution
07/23/2011 14:23:52.10 w3wp.exe (0x125C) 0x03D8 SharePoint
Foundation Runtime
tkauUnexpectedSystem.ArgumentException: List 'Personnel List' does not exist
at site with URL 'http://a-administrator/sites/TestWebParts'. at
Microsoft.SharePoint.SPListCollection.GetListByName(String strListName, Boolean
bThrowException) at
Microsoft.SharePoint.WebControls.SPDataSourceView.GetList(SPContext context,
SPWeb web, Guid listId, String listName)238c2fb4-634c-4416-bdf2-2f2edb773413
07/23/2011 14:23:52.11 w3wp.exe (0x125C) 0x03D8 SharePoint
Foundation Monitoring b4lyMedium Leaving Monitored
Scope (Request
Execution Time=91.3884340787657238c2fb4-634c-4416-bdf2-2f2edb773413
07/23/2011 14:23:52.64 OWSTIMER.EXE (0x1040) 0x1678 SharePoint
Foundation Monitoring b4lyHigh

And i had created the PersonnelList, with data in it.

Below is the code that was used to develop the webpart in 2007. I had copied
this code in to VS2010 to develop the webpart.

<?xml version="1.0" encoding="utf-8"?>


<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">


<type name="Microsoft.SharePoint.WebPartPages.DataFormWebPart,
Microsoft.SharePoint, Version=, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" />

<importErrorMessage>Cannot import this Web Part.</importErrorMessage>




<property name="PageSize" type="int">5</property>

<property name="HelpMode" type="helpmode">Modeless</property>

<property name="Height" type="string" />

<property name="SampleData" type="string" null="true" />

<property name="AllowConnect" type="bool">True</property>

<property name="CatalogIconImageUrl" type="string" />

<property name="XslLink" type="string" null="true" />

<property name="AllowClose" type="bool">True</property>

<property name="Hidden" type="bool">False</property>

<property name="MissingAssembly" type="string">Cannot import this Web

<property name="TitleIconImageUrl" type="string" />

<property name="ChromeState" type="chromestate">Normal</property>

<property name="FireInitialRow" type="bool">True</property>

<property name="Description" type="string">Display top 5 anniversaries
at home page.</property>

<property name="AllowMinimize" type="bool">True</property>

<property name="Xsl" type="string">

<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0"
exclude-result-prefixes="xsl msxsl ddwrt"

<xsl:output method="html" indent="no"/>



1 Answer Found

Answer #1    Answered On: Oct 13    

In your message you said you had created "PersonnelList", but the code is
looking for a list called "Personnel List" (with a space). Try changing the
display name of the list in the site or in the code so they match.

Didn't find what you were looking for? Find more on Webpart Error Or get search suggestion and latest updates.