.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem writing/deploying homemade webpart

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :SharePoint
I'm trying to add a homemade webpart to a page and I keep getting an error:"One of the properties of the Web Part has an incorrect format. Windows Sharepoint Services cannot deserialize the Web Part."

After getting this error I tried deploying a very simple webpart, but this one also gave the same error. Here is the source code for the webpart:

namespace MYWebParts

  [ToolboxData("<{0}:TestWP runat=server></{0}:TestWP>"),
    XmlRoot(Namespace = "MYWebParts")]

  class TestWP : Microsoft.SharePoint.WebPartPages.WebPart
    protected virtual void CreateControlHierarchy()
      Label bob = new Label();
      bob.Text = "BLAH BLAH BLAH";

    protected override void CreateChildControls()


Heres the dwp File:

<?xml version="1.0" encoding="utf-8"?>
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2" >
	<Description>Test Web PArt</Description>
	<!-- Specify initial values for any additional base class or custom pr

View Complete Post

More Related Resource Links

Code Name Longhorn: A First Look at Writing and Deploying Apps in the Next Generation of Windows


The next version of the Microsoft Windows operating system, code-named "Longhorn," marks a significant change not only in terms of how the operating system works, but also in the way in which applications are built. The Longhorn version of Windows includes a new storage system, natural search technology, and an increased emphasis on security and trustworthy computing. Here the author provides an overview of Longhorn, focusing on the build-once, deploy n-times application model. In addition, he discusses the new language, code-named "XAML," that's used to create UI elements, then presents some working samples.

Dino Esposito

MSDN Magazine January 2004

the problem of silverlight sildeshow webpart in sharepoint


I added this silverlight sildeshow webpart (http://www.sharepointevolved.com/blog/Lists/Posts/Post.aspx?List=0586f39d%2Dc3f2%2D4f6c%2Db61f%2D2a33a3fcd95c&ID=27) which  customized a SharePoint data form web part with XML and XSLT to my sharepoint site which uses Active Directory authentication. it looks great (I published the webpage). but after I logout the system account, and login as my regular account with Read permission. the silverlight webpart can't show up. I check the permission of the Picture Library. there is no problem. I can see the pictures in the Picture Library with my regular account.
Anybody has the same problem? how to fix it?


the problem silverlight sildeshow webpart in sharepoint


I added this silverlight sildeshow webpart (http://www.sharepointevolved.com/blog/Lists/Posts/Post.aspx?List=0586f39d%2Dc3f2%2D4f6c%2Db61f%2D2a33a3fcd95c&ID=27) which  customized a SharePoint data form web part with XML and XSLT to my sharepoint site which uses Active Directory authentication. it looks great (I published the webpage). but after I logout the system account, and login as my regular account with Read permission. the silverlight webpart can't show up. I check the permission of the Picture Library. there is no problem. I can see the pictures in the Picture Library with my regular account.
Anybody has the same problem? how to fix it?


Deploying problem with SQL Express 2008 R2

Scientific software package works fine with SQL Express 2008 R2 on developing (mother) PC and Admin login mode, but difficulties are found elsewhere during installing and deploying on the client PCs.  We have used from year 2000 BDE (Borland Database Engine), which worked fine until now, but recently customers had been installing problems with Vista, Windows 7 and the local administration rights or permissions.   Thus I thought to test NT AUTHORITY\NETWORK SERVICE authentication, as this system is hopefully working again decades with coming new Windows versions. As not need to touch databases, ADO and authentication matters during last decade, I’m newbie with those topics.  Worked now few days with this problem, installed and unistalled SQL servers according to instructions, tested different connecting strings and now cannot found correction.  Solution is maybe and hopefully simple.   Attached is log data cut from (old and many times corrected) the main mother XP platform in Admin and Client (Guest) modes.  Same tests are done also with fresh XP installation on VirtualBox.  Used connecting strings are presented inside log files:           Main mother XP at Admin login:   2010-08-20 08:24:45.82 Server      Server local connection provider is ready to accept connection on [ \\.\pip

Problem writing xml

hi, I have wrote the code Dim doc As New XmlDocument() Dim xmlDeclaration As XmlDeclaration = doc.CreateXmlDeclaration("1.0", "utf-8", Nothing) doc.AppendChild(xmlDeclaration) Dim feed As XmlNode = doc.CreateElement("feed") Dim feedatt As XmlAttribute = doc.CreateAttribute("xmlns") feedatt.Value = "http://www.w3.org/2005/Atom" feed.Attributes.Append(feedatt) Dim feedatt1 As XmlAttribute = doc.CreateAttribute("xmlns:g") feedatt1.Value = "http://base.google.com/ns/1.0" feed.Attributes.Append(feedatt1) doc.AppendChild(feed) Dim entry As XmlNode = doc.CreateElement("entry") Dim title As XmlNode = doc.CreateElement("g:title") title.InnerText = "Hello World" entry.AppendChild(title) feed.AppendChild(entry) doc.Save(Server.MapPath("test.xml")) The output of this code is this <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0"> <entry> <title>Hello World</title> </entry> </feed>  As you can see in my code I wrote g:title but here it is title this is the problem why doesn't it make

New Webpart Creating Problem

hi, after the successfully created one webpart in visual studio2008,wen i m creating second webpart then it is showing following error. Error 1 The feature name WebParts already exists in SharePoint. You need to rename the feature before solution deployment can succeed.  I tried to rename the webpart name and deleted from C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES location.But still the same error exist.  

A connection could not be made to the report server - Problem deploying an SSRS report from Business

I’m having trouble with what seems to be a common issue for people, regarding deployment of an SSRS report from Business Intelligence Development Studio. Unfortunately none of the solution I have seen posted here (and elsewhere) have been able to help me so far.   Two of my collegaues can both deploy with no problem, and I am using exactly the same Target destinations as them (TargetDataSourceFolder, TargetReportFolder, TargetServerURL).   I have posted the error message below, which from my basic understaning would indicate, I think, a security issue (perhaps something local to my PC, or user account)   Has anyone experienced this particular issue who might be able to help?   Best wishes, Jamie TITLE: Microsoft Report Designer ------------------------------ A connection could not be made to the report server http://turpin-net.turpin-bg.local/Reportserver. ------------------------------ ADDITIONAL INFORMATION: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message: -- <HTML dir="ltr"> <HEAD><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta HTTP-EQUIV="Content-Type" content="text/html; c

Tag Cloud WebPart Problem - no tags to be displayed

How to link tags with tag cloud webpart. I have many tags placed in my site but still tag cloud webpart says - "no tags to be displayed". i am not able to figure out how tag cloud webpart will display the tags. Please suggest a solution. The tag cloud gets displayed only under my profile not anywhere else.

Problem with Content Query Webpart and Custom Userfields

Dear Community, I am using Sharepoint 2007's content query webpart to access content types from 2 lists each contained in a different sitecollection. To achieve this, I used this tutorial: http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx. The tutorial worked great. By using the property CommonViewFields and modifing the XML Stylesheets accordingly, i could access almost every field. Even User Fieldtypes like editor and author were accessible by adding (editor,User) or (author,User) to the CommonViewFields property. But when I tried to access the custom made userfield "Username" in the same way (adding Username,User to the property), the webpart threw an error and couldn't be displayed anymore. When I changed it to Username,Text , no error occured but it naturally didn't show up, since it is the wrong fieldtype. I hope some of you can help me, since all my researches on this topic only brought up some more people with the same problem, but no solution to it. Thanks in advance, SoundofSilence

Problem with Report parameter inside SSRS Report Viewer webpart with deployment from one server to a

Hi all,I've got this problem.me and my team have developed a lot of reports by using a SSRS configured in Sharepoint Integration Mode.For accessing these report we are using the Sql Server 2008 Report Viewer Webpart.One of its parameter is the Report ur that is an absolute url so the problem is when I move our solution from server1 to server2 I have to re-editing all pages where I've added the Report Viewer webpart for updating the report url with the new servername otherwise it's impossible to view the report.Is there any official or unofficial way to solve this problem ?many thanks

problem deploying report model to wss3 site

hi, im having trouble deploying my report model. when i click on deploy i have to enter a user name and password (i asume that it is the username and password i use to enter my wss 3 site) after that it begin to deploy then i get these 2 errors: Error 1 The required field UserName is missing from the input structure. c:\documents and settings\administrator\my documents\visual studio 2005\projects\essreportproject\essreportproject\ESSP.ds 0 0  Error 2 The path of the item '/Data Sources/ESSP' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. c:\documents and settings\administrator\my documents\visual studio 2005\projects\essreportproject\essreportproject\ESSP.smdl 0 0  when i go to my page in wss3 i can see the datasource and model directory, but i cant use them can someone help me with this and explain it for me.  

Listview WebPart Selectedview problem

We have a problem with the Listview WebPart on our current project.Situation:We are building custom sitedefinitions for a portal site. In these site definition we add our webpart/features that have to be deployed with this sitedefinition.In that defintion (ONET.xml) we add a ListViewWebPart on the page. <View List="Whiteboard" BaseViewID="3" WebPartZoneID="Left" WebPartOrder="2"    Type="108" /> Sofar everything is going fine, we generate our webs with the definition and the webpart renders like it should on the page.We then add an item in the list (Discussion list). Again sofar everything fine. when we then try to click on the item to view it in the webpart the item seems to magically disappear from within the webpart. However the items stays in the list so it's not like it gets deleted.After some searching we found out that when we bind the selectedview on the webpart again (modify shared webpart -> selected view) the item reappears just as magically as it disappeared.The problem is that for our project we have to create more then 90 webs with this sitedefinition and it's not an option manually start clicking every web for this "bug".Whe tried two other ways to solve this problem without success.First way was to remove the listviewwebpart declaration from the ONET and add the webpart with C# code in

Custom Webpart not working on "My Profile" page but works on all other pages. Linq Problem?

Hi, I created a publication site and in that site i created pages with specifique metadata (using a pagelayout with a custom content type)0. My webpart is getting data from those pages and displaying it. My webpart works on every page except on the "my profile" page(overview tab). I get the following error: Invalid Url: /TestSites/course I used the SPMETAL to create a class and i'm using this class to retrieve the data from the pages (with linq). The url i give to the entity is http://pcp/TestSites/course  this works fine on every site except on the my profile page. Can anybody help me? Here is the code i use to retrieve my data: EntitiesDataContext ctx = new EntitiesDataContext(courseSite); //Code below gets only the pages with a courses contentType. //EXCEPTION TRIGGERT ON THE FOLLOWING LINE IF IN PROFILE PAGE EntityList<Courses> course = ctx.GetList<Courses>("Pages"); //Writing the query to get the correct pages(with the course page layout only! var Query = from myCourse in course.ToList() where myCourse.CourseParticipants.Contains(myWeb.CurrentUser.LoginName) Select new{myTitle = myCourse.CourseTitle, myCompany = myCourse.Company, myPath = myCourse.Path, myName = myCourse.Name }; Thx.    

problem in Business Data list webpart

<Entity EstimatedInstanceCount="100" Name="Customer">



problem in Business Data list webpart

<Entity EstimatedInstanceCount="100" Name="Customer">



Problem Deploying the Reporting Services Web Parts to SharePoint



I am trying to install the RSWebParts.cab file - which contains the Report Viewer and Report Explorer web parts - to my SharePoint 2010 server.  I ran the following command in PowerShell: stsadm -o addwppack -filename path/to/RSWebParts.cab -globalinstall. And received "The solution was successfully deployed" message.

However when I go into the SharePoint Server web front-end, I cannot find any trace of the new web parts.  Going back into PowerShell I ran the Get-SPWebPartPack command and the following was returned:

Name                             SolutionId                                                Deployed

rsswebparts.cab               00000000-0000-0000-0000-000000000000    False


So it appears to me that the cab file was loaded but not deployed.  But I'm not sure what I need to do next in order to get this pac

Deploying ASP.NET web service problem



Windows Server 2003, 64-bit

IIS 6.x

To test the above, I created a simple, default HelloWorld ASP.NET web service using VS 2005. The service runs. That is, I can see the HTML page that says "The following operations are supported...."


And if I click on the "HelloWorld" link, the page which has the sample SOAP messages and Invoke button displays. The problem is, if I click on the "Invoke" buttion, I see below errors in a different browser window. Can someone tell me what they mean or better yet, how to fix the problem? (The web service runs just fine on my local XP Professional computer.)






System.InvalidOperationException: Unable to generate a temporary class (result=1).

error CS2001: Source file 'C:\WINDOWS\TEMP\fj76rmhp.0.cs' could not be found

error CS2008: No inputs specified


   at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)

   at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemb

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend