Pages

Wednesday, 28 March 2012

Save as Site Template missing not available

Save as Site Template not available in SharePoint 2010 not true

This one was tricky had a request from a developer that save as site template option isn't available.

Had a look on the site where this option was available and where it wasn't. Did a comparison analysis of the features enabled on both the sites and found this interesting SharePoint Server Publishing feature was activated on the site where save as site template option wasn't available.

Deactivated SharePoint Server Publishing feature and viola save as template was available.

If for some reasons you need SharePoint Server Publishing feature to be active then there is another workaround, you can navigate to site settings of the site where you want to save the site as template

Change the URL i.e.


To: http://sitecollection/site/_layouts/savetmpl.aspx

and now you can save the site as template as well as use Publishing feature. In 2007 , save as template was available but with SharePoint 2010 things have changed. 

Tuesday, 27 March 2012

SharePoint Documents open as Read Only

SharePoint Documents open as Read Only

I had this issue when opening a document it opens that in read only mode.  When editing the document got another error “ An internal error has occurred unable to contact the server. Please contact your system administrator”

Launched ULS viewer that didn’t help as I didn’t see any correlation id error for this
Tried various things, uninstalled WebDAV by following this Microsoft article but that didn’t work:

Tried enabling versioning for the document library got this error:

List does not exist. The page you selected contains a list that does not exist.  It may have been deleted by another user.
Did a restore of web.config backup to a working condition one didn’t work

Performed all the steps listed here:
http://support.microsoft.com/kb/287402

The issue happened in the test environment and had good backups as a precaution.
Resolution for me was:

Create a new web app and a test site collection with a new content db
Everything was okay there
Detached the Content Databases from primary web app
Detached the new Content Database from the new web app
Attached all the Content Databases of primary web app into the new web app
Refreshed the configuration DB using the power shell command
Finally changed alternate access mapping
Redeployed the solution package

IISRESET

Deleted the old primary web app later
This resolved the issue though I didn’t find a silver bullet step to resolve the issue had to rely on the traditional classic approach but in your case the links may resolve the issue.

Tuesday, 20 March 2012

SQL Server Build and Version

I was working on a project to identify all the versions of SQL Servers in our environment with Service packs etc. and propose a solution to manage the SQL Servers efficiently. By the nature of SQL Server, it’s not too helpful to identify the version from the Help button of Management Studio. It displays a version/build number which was not helpful in my case.

I ran the following script which is quite helpful if you want to get info like the Product Version, Product Level, and Editions of SQL Server.

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

Tuesday, 13 March 2012

ambiguous-export-flow-to-single-valued-attribute

This was absolute nightmare. Got a call from a manager that the org browser is not showing correct info and later checked in AD, everythis was alright but in UPS info wasn't correct.

Completed a full synchronization that didn't resolve this. On further research found ambiguous-export-flow-to-single-valued-attribute was causing the issue.

Logged on to the server where User Profile Servie was running.
Launched the Synchronization Service Manager from here:

C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell > miisclient.exe

Click on Management Agents
Found the following three agents

Name                                       Type
ILMMA                                   FIM Service Management Agent
MOSS-244-GUID                   Extensible Connectivity
MOSSAD-AD Sync               Active Directory Domain Services

Selected Moss-224-GUID , in the lower right panel found 2000+ entries with ambigious-export-flow-single-value-attribute error

Found Manager metaverse and data source attribute is casuging this error



Now Click on Metaverse Designer, Select Person, this object contains the manager attribute





In the Lower right corner, Under Actions ,Click on Add Attribute




This opens Add Attribute To Object Type.
Click on New Attribute




Created a new attribute with name mgr
Attribute Type as Refernce(DN)
Select Mutli-Valued box
Click Ok




Now Click on Management Agents to assign an attribute flow
Right Click on MOSS-24-GUID  and select Properties




From the left panel , Click on Configure Attributes
Select Manager and Click on Edit
Now select the check box;: Attribute is a multi-valued
Click Ok



Had to configure the new mgr attribute.
Click on Configure Attribute Flow
Expand Object Type: User and scroll down till you see Manager attribute
I have mapped the Manager data source attribute with mgr metaverse attribute with the following options

I would suggest delete the existing manager one and click on New to create a new flow
Select Data Source Object type as User and Attribute as Manager
Select Metaverse Object type as Person and Attribute as mgr

Click Ok and go back to the properties to see the new mapping exists


I now had taken care off the MOSS-24-GUID but now had to apply the same settngs for MOSSAD-AD Sync 
I.E. Go to the Properties for MOSSAD -AD Sync
From the left panel , Click on Configure Attribute  Flow
Delete the existing Manager attribute
Click on New
Select Data Source Object type as User and Attribute as Manager
Select Metaverse Object type as Person and Attribute as mgr
Click Ok

Once this is done, reset the IIS
Run a full synchronization and now everything works for me. I see all profiles being imported into SharePoint from AD

This resolved the issue for me but you may have to identify which attribute has got an issue and sort it out accordingly would suggest to test this on Test environment before appyling the change in Production.

Please note this issue is fixed in December 2010 CU.



The Execute method of job definition Microsoft.Office.Server.UserProfiles.UserProfileImportJob (ID ) threw an exception. More information is included below.An update conflict has occurred, and you must re-try this action. The object UserProfileApplication Name=User Profile Service App was updated by sharepointfarm, in the w3wp (3936) process, on machine Database server. View the tracing log for more information about the conflict.


Got the execute methdod error when stopping/startig user profile services , followed the below steps and it worked for me.
Accounts:

Domainname\sharepointsuperuser
Domainname\sharepointsuperreader       

Launch SharePoint 2010 Management console to run the powershell commands

$webportal = Get-SPWebApplication -Identity "SharePoint - 39051"

$webportal.Properties["portalsuperuseraccount"] = "domainname\sharepointsuperuser"

$webportal.Properties["portalsuperreaderaccount"] = "domainname\ sharepointsuperreader"

$webpoportal.Update()

Executed iisreset and issue  resolved for me

Unexpected error occurred user profile service application


Unexpected error occurred when accessing user profile service application

This happened after restarting user profile services via central admin. Launched ULS viewer and found this error

UserProfileServiceUserStatisticsWebPart:LoadControl failed, Exception: System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)   

Launced command prompt and executed the iisreset on the server where user profile is provisioned.

Iisreset  /noforce

Boom issue resolved :)

If this doesn't work for you, check the ULS Logs for more info to troubleshoot this. Its a handy tool.

I would stop the user profile services from central admin
Check if the forefront services are stopped
If both services started, check forefront services if they are started
Check if you're able to launch Forefront synchronization service manager

If the user profile services are stuck in starting stage, follow the steps mentioned here

http://sp-vinod.blogspot.co.uk/2012/07/user-profile-syncnronization-service.html

This may help in resolving the issue.

Monday, 12 March 2012

Troubleshoot User Profile Sync in SharePoint 2010


Troubleshoot User Profile Sync in SharePoint 2010

Lately I have been encountering issues after issues with User Profile service application and on further research found this excellent troubleshooting approach in the form of an Visio chart.


I have found this here, may also help others:

Friday, 9 March 2012

The management agent "MOSS-244b2662-ff5e-43ef-b757-40c86630fd35" failed on run profile "MOSS_DELTAIMPORT_cbbb1a7b-67ed-4f8d-90ae-f942cc80ca0c" because the server encountered errors

When you run a full /incremental synchronization in user profie service app, it throws the management error in event logs and doesn’t complete/run the user profile import from Active Directory to SharePoint.
Launch Synchronization server manager; here is how to do it:
Remote desktop to the server on which you have got User Profile server up and running
Navigate to the path: C:\Program files\Microsoft Office Server\14.0\Synchronization Service\UIShell\
Double click on miisclient.exe, this will launch synchronization server manager
Found that Extensible Connectivity agent was failing with a status of stopped-extension-dll-exception via the Synchronization server manager.
It was caused due to an incorrect url and port change for the central admin. FIM had a stale URL which we no longer use. Here is how I fixed it:
  1. Navigate to C:\Program files\Microsoft Office Server\14.0\Synchronization Service\UIShell\
  2. Launch miisclient.exe
  3. Click the ‘Management Agents’ button in the toolbar to switch to the “Management Agents” pane
  4. Right click on the Management Agent with the “Extensible Connectivity” type called MOSS-{guid} and select “Properties”
  5. Click on the “Configure Connection Information” property pane
  6. At the bottom of the dialog, there should be a “Connection information” section which includes a “Connect To:” text box
  7. Change the hostname of the URI in this text box to direct://{HOST}:{PORT}…
  8. Click OK, and close the Synchronization Service Manager (miisclient)
  9. Start a full import and everything should now work.

This report failed to load because session state is not turned on

"This report failed to load because session state is not turned on" when you try to view Microsoft Access Services reports

When you access the reports on access web based site it throws an error This report failed to load because session state is not turned on

Enable the session state via PowerShell and that resolves the issue.

Enable-SPSessionStateService

Prompts for the Database Name: <Databasename>

Example: Enable-SPSessionStateService  AccessReportsDB

There is nice article from Microsoft on how to fix this.

Error: Access Services is unable to process the request

Error: Access Services is unable to process the request

Checked the permissions of the service account on database as well as on service application all was well with it. We recently installed Service Pack 1 and later June 2011 cummulative update in our environment. That seems to disturb the security token service.

Run the following PowerShell to resolve the issue.

PS c:\> Get-SPServiceApplication
PS c:\> $sts = Get-SPServiceApplication | ?{$_ -match "Security"}
PS c:\> $sts
PS c:\> $sts.Status
PS c:\> $sts.Provision()

IISreset  and once iis was reset, we were all good to leverage our access based sites. 

Wednesday, 7 March 2012

Reset SharePoin 2010 farm passphrase powershell


As a part of SharePoint’s migration from pilot to new production environment we had to Join two new application servers but somehow the old farm passphrase didn’t work when  joining the application server in the farm may be I had an incorrect password. Anyways, this life saving PowerShell command helped massively to change the farm passphrase.

Open the SharePoint 2010 Management Shell

Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Management Shell

Enter this at the PowerShell prompt:

$passphrasereset = ConvertTo-SecureString -asPlainText -Force

Input the new passphrase and hit Enter
Enter this at the PowerShell prompt:

$Set-SPPassPhrase -PassPhrase $passphrasereset -Confirm

You will be asked to confirm the passphrase by re-entering it.  Re-enter the passphrase and hit Enter

You will be asked if you are sure that you want to perform this action, type Y (for Yes) and hit Enter. 

Your farm passphrase has now been reset!

The security validation for this page is invalid in InfoPath form

Error  Message : Failed to get SPGroupName from GroupID. Error Message: Group cannot be found. Callstack: at Microsoft.SharePoint.SPGroupCollection.Get ByID(Int32 id) at Microsoft.SharePoint.WebControls.PeopleEditor.set_SharePointGroupID(Int32 value). 
The security validation for this page is invalid in InfoPath form

Most of the articles suggest to disable Web Page Security Validation in the Web Application settings which is alright to fix the issue on a temporary basis specially if its not a production environment. Here are the steps:
  1. Open Central Administration -> Manage Web Applications -> General Settings
  2. Web Page Security Validation -> Off.
  3. OK
If it’s a production environment I wouldn’t suggest using this as a solution could cause serious security risk. I was able to resolve this by adding an entry here:

Under the 14 hive, under template/layouts, find the formserver.aspx file. 
Backup the file and then edit it with any text tool, say, notepad.
Under the <body> tag, add the highlighted line of code.

<body runat="server" id="PageBody">
<SharePoint:FormDigest runat="server" />

Save it.

iisreset won’t hurt

You may have to do this if on each server . In my case, I had to republish the InfoPath form as an administrator approved form and change the form template in the form library to the published form content type which solved the issue after adding the entries in formserver.aspx. 

Thanks to MSDN for offering this solution. Saved time !

Change SharePoint central admin port number


In my current environment we had 2 wfe’s in our environment with wfe and app server roles clubbed together on it during the pilot phase. As a part of SharePoint infrastructure migration to a production environment and a new logical design we added 2 new app servesr and segregated the roles on i.e. wfe  and app server roles inthe new environment.

The requirement was host to central administration from app server and somehow the port was changed automatically while doing so. And it didn’t allow us to re-run product configuration wizard as the ports were different.

Got this error: Failed to register SharePoint services.  An exception of type System.UriFormatException was thrown.  Additional exception information: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.
System.UriFormatException: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri.CreateUri(Uri baseUri, String relativeUri, Boolean dontEscape)
   at Microsoft.SharePoint.Administration.SPSiteCollection.get_Item(String strSiteName)
   at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.get_HealthRules()
   at Microsoft.SharePoint.Administration.Health.SPHealthAnalyzer.RegisterRules(Assembly assembly)
   at Microsoft.Office.InfoPath.Server.Util.HealthAnalyzerRegistration.RegisterHealthRules()
   at Microsoft.Office.InfoPath.Server.Administration.FormsService.Update()
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInConfigDB(Boolean provisionTheServiceToo, String serviceRegistryKeyName)
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServices(Boolean provisionTheServicesToo)
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.Run()
   at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Run the following PowerShell command and reran product config wizard and it meet the need.

Set-SPCentralAdministration -Port <port number>

Example: Set-SPCentralAdministration -Port 2222

Note:

The Set-SPCentralAdministration cmdlet blocks the following ports:
Lower than 1023
Higher than 32767
443 (SSL)