Skip to main content

SharePoint 2010 - English

Go Search
SharePoint 2010
SharePoint 2010 English
SharePoint 2010 中文
SharePoint 2007
SharePoint 租用
Nanmu Home
留言
  

 ‭(Hidden)‬ Admin Links

SharePoint 2010 > SharePoint 2010 - English
SharePoint 2010 - English

 All Posts List

Expand/Collapse CategoryDevelopment ‎(8)
Expand/Collapse CategoryManagement ‎(4)
Expand/Collapse CategoryOverview ‎(8)

 Posts

The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator
You may receive this error when trying to publish a page in SharePoint 2010
The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator.
Solution:
You would need to install the ‘State Service’ via the Configuration wizard in Central Administration or via PowerShell.
To configure the State Service by using Windows PowerShell:
1. Click Start, Administrative Tools, Windows PowerShell Modules.
2. In Windows PowerShell, type $serviceApp = New-SPStateServiceApplication -Name “State Service”
3. Create a State Service database and associate it with a service application, by typing New-SPStateServiceDatabase -Name “StateServiceDatabase” -ServiceApplication $serviceApp
4. Create a State Service Application Proxy and associate it with the service application by typing New-SPStateServiceApplicationProxy -Name “State Service” -ServiceApplication $serviceApp -DefaultProxyGroup
(You can use another proxy group if necessary by changing the DefaultProxyGroup parameter)
Tip:
You can view a list of all State Service cmdlets in Windows PowerShell by typing gcm *spstate*
Authentication in ClientContext in Sharepoint 2010
In SharePoint 2010, we can program with ClientAPI, so we will meet authentication in ClientContext, How to authentication? We can use NetworkCredential, the follow is the demo code.
----------------------------
try
{
  System.Net.NetworkCredential credentials = new System.Net.NetworkCredential("administrator", Password", "<<domain>>"); 
    using (ClientContext clientContext = new ClientContext(http://www.nanmu.net))
    {
       clientContext.Credentials = credentials;
       Web site = clientContext.Web;
       clientContext.Load(site);
       clientContext.ExecuteQuery();
       Console.WriteLine("Web Site Title: {0}", site.Title); 
       Console.ReadLine();
     }
}
catch (Exception ex)
{
    Console.WriteLine(ex.ToString());
}
How to change the authentication to forms based authentication Mode in Classic mode authentication

SharePoint 2010 provider two authentication providers,

First: Claims Based authentication.

Second: Classic Mode Authentication.

In SharePoint 2010 RTM Version, it doesn't support forms based authentication with class mode, only claims based authentication.

You can select the authentication provider only at create the new web application.

If you select Classic mode authentication, you can't use forms based authentication. So, you must change the authentication to Claims based authentication. How to change it?

Then the SharePoint 2010 Management shell is the useful tools.

Click start-> all programs -> SharePoint 2010 products -> SharePoint 2010 management shell. Then do as follow:

  1. Input $app = Get-SPWebApplication "URL"
  2. Input $app.UseClaimsAuthentication, then press Enter, you will see the "false"
  3. Input $app.UseClaimsAuthentication = "True", to set the web application use Claims authentication
  4. Input $app.Update(), save the changes to database.

OK, you can use forms based authentication mode.

Easy to reset SharePoint 2010 farm passphrase

SharePoint 2010 passphrase can improve SharePoint farm security.

But sometimes we may forget the passphrase, and SharePoint 2010 doesn't provide a recovery method.

Luckily, we can reset the passphrase by SharePoint 2010 Management Shell.

Open the Power shell: start -> All Programs -> SharePoint 2010 Products -> SharePoint 2010 Management Shell.

Input [Get-Help Set-SPPassPhrase -examples], press enter, you will see the example.

The [$passphrase] is a variable value which we declared.

Then input [Set-SPPassPhrase –PassPhrase $passhprase -Config], press enter. And then you can input by the wizard.

See the follow picture, you will understand easily.

Reset SharePoint 2010 Farm PassPhrase

SharePoint 2010 Provisioning A New Farm with PowerShell

Launch the SharePoint 2010 Management PowerShell.

Click in the steps: Start -> All Programs -> Microsoft SharePoint 2010 Products -> SharePoint 2010 Management Shell.

The management shell:

Input "New-SPConfigurationDatabase" command, press Enter key.

And then you will input the Configuration database name, Database Server;

Then, it will open a window for input credentials;

At last, input the Passphrase.

Ok, the configuration database create successful.

Launch The SharePoint 2010 Products Configuration Wizard.

Click in the steps: Start -> All Programs -> Microsoft SharePoint 2010 Products -> SharePoint 2010 Products configuration wizard.

Click next,

Click Yes, attention please, the next window is the Config SharePoint Central Administration Web Adpplication, like this:

Change the port number,

Click next,

Click next button, it will create a SharePoint Farm.

OK, create successful.

Update for SharePoint Foundation 2010 - KB2032588

Some days ago, precisely on 13th of July, Microsoft has released an update for Microsoft SharePoint Foundation 2010, described in this KB:
http://support.microsoft.com/kb/2032588

The update was made in automatic ny Microsoft Update, so you can find it into this month automatic updates. Once installed, you can view tha the Microsoft.SharePoint.dll libraries was port to the number: 14.0.5050.5001
It seems that the update was released for a file missing.

Remember to run "SharePoint Products and Tecnologies Configuration Wizard" tool before the update installation.

Exception from HRESULT: 0x80040E14 using stsadm

If you run into a HRESULT: 0x80040E14 error code using SharePoint or STSADM, it means that the SQL Server is running out of space on the filesystem which holds the transaction log or the databases.

Here is what happens to me:

stsadm -o restore -url http://YourServerUrl/ -filename yourSiteBackUp.bak -overwrite

Exception from HRESULT: 0x80040E14

After removing unnecessary files from the Sql Server's Data and the Transaction Log's hard disks, i was able to re run successfully the command:

stsadm -o restore -url http://YourServerUrl/ -filename yourSiteBackUp.bak -overwrite

Operation completed successfully.

SharePoint 2010 Administration Toolkit v1 available

From the SharePoint team blog, the announce of the version 1 relase of the Administration Toolkit for SharePoint 2010.
The toolkit has some new tool for SharePoint farms  administration. Here in details:

  • User Profile Replication Engine 2010 (UPRE2010): this tool got a complete overhaul and was converted to PowerShell. It now allows you to replicate Profile and Social data between SharePoint 2010's User Profile Application (UPA), as well as backward compatibility with SharePoint 2007's SSP. You can replicate between SSP's or UPA services, as well as across versions. (Note that only Profile data can be replicated across versions, as SSP contains no Social activity tracking).
  • The Security Configuration (SCW) Manifest: SCW is an attack surface reduction feature in Windows Server. This manifest adds roles for SharePoint 2010 Products to Windows Server 2008 with SP2 or Windows Server 2008 R2.
  • The Content Management Interoperability Services (CMIS) Connector: enables SharePoint users to interact with content stored in any repository that has implemented the CMIS standard, as well as making SharePoint 2010 content available to any application that has implemented the CMIS standard.
  • The Load Testing Kit (LTK): LTK generates a Visual Studio Team System 2008 (VSTS) load test based on Windows SharePoint Services 3.0 IIS logs. The VSTS load test can be used to generate synthetic load against Microsoft SharePoint Foundation 2010 as part of a capacity planning exercise or a pre-upgrade stress test.

To download it, please follow this address:
http://www.microsoft.com/downloads/details.aspx?FamilyId=718447d8-0814-427a-81c3-c9c3d84c456e&displaylang=en

And here, for the documentation:
- SharePoint Foundation 2010: http://technet.microsoft.com/en-us/library/cc508986.aspx
- SharePoint Server 2010: http://technet.microsoft.com/en-us/library/cc508851.aspx

Happy download !

How to solve the error: "The crawler could not communicate with the server"

If you're looking at your search index log and you see an error notification with this message:

The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly

you hve to immediatly check that the address specified as the error source, it's available and viewable from the browser using remote desktop on the index server.
Probably, you have a SharePoint farm with more servers and that url works fine if you access it through your front-end web servers, but it may have some access problems from your index servers, so you have to check it.
If you'll try to open that url from an index server, you'll notice a 5xx error message.
Now, you have to check that message and solve it, before make the SharePoint search available for all.
In our case, the application pool of our web application was stopped, and we have some 500 error messages.
To solve the problem, we have just restared it.
We hope it will be usefull to someone.

How to move a SharePoint site within the same Site Collection

Some days ago, we spoke about the content migration and deployment API offerted by SharePoint to move sites from different site collections.
The same operations are available using backup and restore operations of STSADM command line tool, those from Central Administration, those from SharePoint Designer and using the "Site Manager" tool (available on MOSS 2007 with publishing feature activate at site collection level and opening the page at "Site settings" > "Content and structure").

But, if we want to write a custom application that moves one or more sites from their current location to a new one, within the same site collection, we have another feature that SharePoint offers us. This feature is called "reparent" and allow us to move a SharePoint site within the same site collection without do any backup or restore operation.
To use it, we have to insert into our Visual Studio project the reference to the Microsoft.SharePoint.dll and add this lines of code into our custom application:

string oldUrl = "http://servername/SiteToMove/";  
string newUrl = "Dev4Side/SiteMoved";  
using (SPSite site = new SPSite(oldUrl))  
using (SPWeb web = site.OpenWeb())  
{  
  web.ServerRelativeUrl = newUrl;  
  web.Update();  
}

In this sample, it will be moved a SharePoint site from address "http://servername/SiteToMove" to the address "http://servername/Dev4Side/SiteMoved".
So, simply modifying the value of the ServerRelativeUrl of an object of the SPWeb we have moved a SharePoint site, its contents and all the permissions, within the same site collection.
Clearly, the new address assigned to the SharePoint site that we want to move over our site collection has to be valid and working till that site name. For example, if we want to move a site to the address "http://servername/Dev4Side/Products/SilverlightGantt", the sites "http://servername/Dev4Side" and "http://servername/Dev4Side/Products" have to exists.

We have to know that we can use the same "reparent" feature through the STSADM command line tool, using the "renameweb" operation:

stsadm -o renameweb -url http://servername/SiteToMove -newname Dev4Side

This line, moves the site to the address: "http://servername/Dev4Side".
Not bad, isn't it ?

1 - 10 Next