.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

Add New Item to Enterprise Wiki with Web Service

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :SharePoint

I'm working on a console application to migrate several wiki sites to SharePoint 2010. I have the following code

string articleTitle = "My Wiki Article";
string content = "<p>Hello World</p>";
string title = wikiSiteName ;
//now write this to the new site
string strBatch = "<Method ID='1' Cmd='New'>" +
"<Field Name='ID'>New</Field>" + 
"<Field Name='PublishingPageContent'>" + System.Web.HttpUtility.HtmlAttributeEncode(content) + "</Field>" +
"<Field Name='Title'>" + articleTitle + "</Field>" +
"<Field Name='LinkFileName'>" + articleTitle + ".aspx" + &qu

View Complete Post

More Related Resource Links

Update SharePoint List item using UpdateListItem web service with javascript

I'm using the Custom_AddListMenuItems function in a CEWP to add a menu item to each list item to Archive that item. This is achieved by updating a choice field in the item to 'Archived'. I'm trying to do this using the web service UpdateListItem web service to update the item using Javascript, but I can not find the correct code that updates the list item. I'm using this code:     var ctx=currentCtx;     var ciid=currentItemID;     var xmlHttp=null;     if (confirm("Are you sure you want to Archive this item?"))     {         var soapRequest = '<?xml version="1.0" encoding="utf-8"?>'+             '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+             '    <soap:Body>'+             '        <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+         

Shielding Exceptions at WCF Service Boundaries using Microsoft Enterprise Library 4.1

To enable the exception shielding feature in my WCF service I have done the following steps Added references of the following assemblies: Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.dll Microsoft.Practices.EnterpriseLibrary.Common.dll Microsoft.Practices.ObjectBuilder2.dll Added a Using statement for Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF. Added the ExceptionShielding attribute to a service implementation class and specified the name of the exception policy to use as a constructor parameter. Add the Exception Handling Application Block configuration sections to the service's Web.config file. <add name="WCFServicePropogate">         <exceptionTypes>           <add type="System.Exception, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"             postHandlingAction="ThrowNewException" name="Exception">             <exceptionHandlers>               <add exceptionMessage="I created the exception" faultContractType=

how to create a doc library item using web service

Hi, I think this is a common question, but I coulnd't come up with anything at this point. I'd like to create an item in a document library using SP web service. - no uploading a file. I have created an item using ../copy.asmx web service. Using the WS function(copyWebService.CopyIntoItems function), it seems suitable to create an item AND at the same time to upload a file. I don't think I can just create an item with this function. How do i just create an item? any reply is appreciated.  

Create a Page Layout for Enterprise Wiki with content

I need to create a Page Layout that for an Enterprise Wiki Page that already has content in the Rich Text HTML Field so when people go in to create a new page based off of the Page Layout they can go in and just replace the text with their own. Can this be done?

Item Not inserted into sharepoint list via web service.

Hi all, I am developing a silverlight application. In that application I want to insert data into sharepoint list using Lists.asmx web service. I am retrieving data from grid view and storing data into sharepoint list using method  UpdateListItemsAsync(). But some time all the data from all the eight grid view rows get inserted properly, whereas some time only for rows get inserted, sometime only three. I am not understadding this asynchronous behaviour. Can anyone explain what I have to do to insert all eight rows every time. Thanks,   -Kaustubh

Failed to upgrade SQL 2K5 Express to Enterprise: Service 'MSSQL$OFFICESERVERS' could not be starte

Hello, I have a standalone SharePoint Server 2007 with SQL Server 2K5 Express and today I upgrade the SQL 2K5 Express to Enterprise with the command: setup.exe SKUUPGRADE=1. At the last, the wizard give me a error dialog saying the following error.  I search the Internet for half a day but in vain. Hope you can show me some idea. Thanks. TITLE: Microsoft SQL Server 2005 Setup------------------------------ Service 'MSSQL$OFFICESERVERS' could not be started. Verify that you have sufficient privileges to start system services. The error code is (1067) The process terminated unexpectedly. For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=setup.rll&EvtID=1067&EvtType=sqlsetuplib%5cservice.cpp%40StartServices%40sqls%3a%3aService%3a%3aStart%40x42b  Hope Helpful | Xiaofeng Wang | http://www.leoworks.net

Item has already been added. Key in dictionary.. How do I clean up service account? Very nasty


I made a few changes in service accounts and now CA Configure Service Accounts and other application pages fail with wtth:

Item has already been added. Key in dictionary: 'dev\svcebrd'  Key being added: 'dev\svcebrd'

Here is what log says when FarmCredentialManagement.aspx opens:

SID |0 cannot be resolved. Using old name: |1. |2

System.ArgumentException: Item has already been added. Key in dictionary: 'dev\svcebrd'  Key being added: 'dev\svcebrd'    at System.Collections.SortedList.Add(Object key, Object value)     at Microsoft.SharePoint.WebControls.ManagedAccountPicker.OnInit(EventArgs e)     at System.Web.UI.Control.InitRecursive(Control namingContainer)     at System.Web.UI.Control.AddedControl(Control control, Int32 index)     at ASP._admin_farmcredentialmanagement_aspx.__BuildControl__control22(Control __ctrl)     at Microsoft.SharePoint.WebControls.InputFormControl.OnInit(EventArgs e)     at System.Web.UI.Control.InitRecursive(Control namingContainer)     at System.Web.UI.Control.AddedControl(Control control, Int32 index)     at ASP._admin_farmcredentialmanagement_aspx.__BuildControl__control16(Control __ctrl)     at Micros

Upgrade/Migrate MOSS 2007 Wiki to SharePoint 2010 Enterprise Wiki


We've been running MOSS 2007 for a few years now and have built up a Wiki.


I am now investigating the migration to SharePoint 2010, I've used the database attach method to copy across our Intranet site collection to a development SharePoint 2010 install (this includes our Wiki).


This works except for an error under the "Recent Changes" heading and the new 2010 Enterprise Wiki features are not available.


What I'm trying to find out is if there is a way to either upgrade the Wiki sub-site or migrate the Wiki data into a new 2010 Wiki sub-site that I can swap for the live one.


I've tried to just copy the items from the "Wiki Pages" list of the imported sub-site to the "Pages" list of a new 2010 Wiki sub-site, but they then just appear as "ASP.Net pages" and don't display the Wiki content.

I've also tried a couple of the commercial migration tools but these also just seem to copy the aspx files and leave them not viewable.


Thanks in advance


Item update in the sharepoint list using web service with javascript



I am using below code for web services with javascript


function CreateListItem(Title)



    var soap1 = createEnvelope(Title);


    var ws = new ActiveXObject("Microsoft.XMLHTTP");    

      if(ws == null) 

       return null;





    ws.setRequestHeader("Content-Type", "text/xml; charset=utf-8");            







  function createEnvelope(Title)


     var batch;

var xmldoc;    

var ListName = 'S

Issues with Enterprise Wiki Sites unavailable when create Intranet Team Site


I have created Enterprise Wiki Sites and have created an Extranet Team Site and was able to create an Enterprise Wiki Site as well with it but for some reason I do not have the ability or option to create an Enterprise Wiki Site or even page when I have a Team Site on an Intranet.  I have turned on all of the publishing features but the only wiki item available to me is the wiki library.  

I'm assuming I must have to activate or deactivate some other feature but I have no idea which one.

Sharepoint 2010 Enterprise Wiki - TOC, Table of Content - Displaying only headers for individual pag


I am currently trying to build a wiki for our users in Sharepoint 2010, but there is one particular item I just can't get right. The table of content...

I am aware of the web part TOC, but this one can't be configured to display headers for an individual page only. Instead it insist on displaying all my navigation links, for all my sites, which is quite unnecessary since they are already displayed in the navigation pane to the left.

Is there a way to create a TOC as you see on any other normal wiki page, so it would end up looking similar to my example below?

[SITE Header Example]

1. Header

1.1 Subject 1

1.2 Subject 2


2. Header 2

2.1 Subject 3 and so on...


Then the TOC should be placed in top and look similar to this.


1. Header

1.1 Subject 1

1.2 Subject 2

2. Header 2

2.1 Subject 3


Can this be done, or would it require any 3rd party plugins?

I'm a bit baffled that the build in web part isn't more configurable, since I would have guessed that MS actually would have looked at other wiki pages to see how it is done, before adding their own templates? But maybe I am missing the obvious

Enterprise Wiki and List Property



I have Enterprise Wiki, on my Home Page - Site Name is Enterprise Wiki > Home Page,
when i create another Wiki Page: Home Page 2.aspx - Site Name is EnterPrise Wiki > Home Page 2. This is good.

But if I create Directory "Directory 1" and in this Directory I create Page: Page in a Directory.aspx, I need to have Site Name: Enterprise Wiki > Directory 1 > Page in a Directory; when i create second directory inside first and third directory inside second I need Site Name to be: Enterprise Wiki > Directory 1 > Directory 2 > Directory 3 > Some wiki page
(automaticaly on create)

Error while creating an Enterprise Wiki


One of my users got the following error message while attempting to create an Enterprise Wiki:

Provisioning did not succeed. Details: Failed to initialize some site properties for Web at URL: {URL of the Wiki he tried to create} Original Exception: Failed to compare two elements in the array.

I tried to create the wiki myself and got the same error message. I am the administrator so I'm certain it's not a permissions problem.

The Quick Launch item for the Wiki is no longer bringing up the Home.aspx page


I created a new Wiki Page Library a couple of days ago called "Team Wiki". After playing around with the wiki pages a bit. The default Quick Launch item for the wiki was called "Team Wiki" on the left navigation bar in the default theme. The link when I hover over the "Team Wiki" text points to ".../Team%20Wiki/" which it always has. However, when I click the link it takes me to the URL ".../Team%20Wiki/Forms/AllPages.aspx" instead of the URL ".../Team%20Wiki/Home.aspx" which it used to by default a couple of days ago. Is there any way for me to get my default Quick Launch item to point back to the URL ".../Team%20Wiki/Home.aspx"? The default Home.aspx page is still in the same location as the How%20To%20Use%20This%20Wiki%20Site.aspx page is.

Unable to retrieve Lookup fields or item URL values from Library(Wiki Page Library) item when using



When I execute, "l["Category"].ToString();" and the field is a lookup field it returns, "Microsoft.SharePoint.Client.FieldLookupValue[]", on the other hand when I execute "l["Description"].ToString();" which is a normal string field I get the string(multiline) value back, any idea what could be going on here? I have tried, static/internal/displayname all with the same result(lol moment,

helpdesk service requests - how to add edit item button on dispform.aspx using sharepoint designer 2


I have made changes to a service requests list edit form using designer 2007. It gave me an message about this change will move it alway from site definition or something like that. Then the link to the Eidt form lost. Users cannot see the "Edit Item" button on the dispform.aspx. And when right click on the item ->edit item link will bring users to the default.aspx.

Is there a way to put the link back? Or is there a programming way to reslove this issue? any references I can read?

many thanks........

Can't create new pages in Enterprise Wiki



I create a new Enterprise Wiki in any of our 4 site collections, I can edit the home page, create lists or libraries from the homepage, but I can only add pages with the farm admin account. I don't have this issue with any site, library, or list within the site collections. I've given certain users and groups Full Control permission on both the wiki site and specifically on the pages library, but no user can create pages from there. From the main page of the wiki, choosing Site Actions> NewPage and entering the page title and create results in an "Access Denied" and says to sign in as another user. If I go to the Pages Library> Choose New Document and choose any of the options (e.g., Enterprise Wiki Page) I get an "Access Denied" message. If I go to that library and choose "Check Permissions" and enter my username (or any of the other usernames I've given access to this site) I see I have Full Control and the others have design.  

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