How to change Site Title and Description using Sharepoint Web Service? - sharepoint

I want to read and change the Title of sharepoint site (both SPSite and SPWeb) using Sharepoint web services.
I have the url to the sharepoint site. Wanted to change the title of the page using the sharepoint web service.
Cannot create a SPWeb.
Any input.

I don't think the current SharePoint webservices have methods for updating a web or site collection's Title. However, you could write your own webservice that could do this fairly easily.

You can get the title and description through a web service but don't change it because there's no update method. Webs.GetWeb Method

Related

How to create custom masterpage in SPFX classic view

I have created SPFX Project and created Masterpage in classic view and hosted it already in SharePoint online and when I add my SharePoint framework Web parts
to the master page after 2 days cannot edit anymore on the save or do any actions from SharePoint ribbon however my master page works fine at SharePoint online, SO after a lot of searches I found all people use Modern View but in the modern view, I cannot do any branding to my portal
is there any way to fix this problem or Doc to how to create a master page in the SharePoint framework?
You were not able to add branding in Modern Page. You have to use the SharePoint Framework Extensions. By using Application customizer, you can add your customization's in the page placeholders.
Here you can start page placeholders in application customizer.

Adding a Custom Webpart to a Site Template in Sharepoint 2010

I tried to add a custom created webpart to a customized team site which I then saved as a template. The webpart in question worked fine with the original site. However, when I created a new site based on this template(within the same server that the webpart in question was deployed to) the area which was supposed to contain the webpart was blank. Is there anything I'm missing or is it not possible to deploy a custom webpart into a custom site template?
Just guessing here because I haven't tried it but when you add a webpart to the page you are essentially customizing that page for that specific site. The webpart location is stored in the content database just for that individual page.
When you save a site as a template you are just saving the structure so when you provision a new site the customized page isn't there.

Adding a custom tab and page MOSS MySites that everyone can see

On MOSS mysites I want to be able to create a new tab that every mysite user can view, it should show a web part page.
How can I do this?
Create a site collection as a parent to all the MySites. Or to put it the other way, make the MySites a subsite to a site collection that has the site that you want all the MySites to see.
In your Shared Services Provider (Central Admin/Shared Services Admin), look under User Profiles and My Sites. You can select Personalization Site Links and point to an existing site that contains the web part page you want to display.
You can also filter the display using the Audiences functionality so that it only displays to a select group of users.
In regards to #Brian Meinertz's comment. This a detailed blog on Microsft's site about feature stapling:
Customizing MOSS 2007 My Sites within the enterprise

How to add a custom web part to a webpart page through code?

I wanna how to add a custom web part to a webpart page through code? The custom web part is already deployed to the SharePoint site. It's a MOSS instance.
To place a web part on a page you have to use the SPLimitedWebPartManager which could be retrieved from the actual SPWeb object.
After creating an instance of the web part you want to add to the page, you call the AddWebPart() method of the web part manager and pass the web part instance as a parameter.

Access sharepoint list from windows application

Can anyone tell me if I have some ways to access to sharepoint list from windows app?
I've tryed following way (i'm under user that is sharepoint member):
SPUserToken token = new SPUserToken(
BitConverter.GetBytes(WindowsIdentity.GetCurrent().Token.ToInt32()));
SPSite site = new SPSite(siteName, token);
but no luck...
Your best bet is to use a web reference to query the SharePoint WebService's GetListItems web method:
http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
Like Jason said, to be able to use the SharePoint Object model (i.e. the sharepoint dll's) the app needs to be running on the same machine as SharePoint. If it is anywhere else you can only use the Web Services provided by SharePoint (or create your own and deploy that to your sharepoint server).
P.S. In SharePoint 2010 you have the client object model at your disposal, basically a subset of the full sharepoint object model (Kinda like Silverlight). Of course sp2010 is still in beta....
This article provides an excellent and detailed step by step tutorial on how to do this using Linq and Web services. It does create a console application instead of a Windows application but it is very easy to translate this into a Windows Form app if needed. I found this article very useful when I started working on programatically communicating with SharePoint lists because it clearly demonstrates how easy it is to work with the web service response from SharePoint using LINQ.
Is siteName on the same computer that you are running the windows application from? If not, then you won't be able to access that site if you're using SharePoint 2007.
If the above isn't the problem, then check that the user account WindowsIdentity.GetCurrent() is at least a site owner on siteName.

Resources