09 May, 2014

No UserProfileApplicationProxy exists in the current context

Today one of our business owners has reported their workflows are failing. It’s quite strange as I am taking care of the infrastructure and no changes has made recently i.e. no language packs, no patch upgrade, no third party software installation so I wasn’t sure what exactly happened and their workflows have started failing.

Before checking anything, I have restarted the SharePoint Timer Service to make sure everything is working properly as workflows jobs are dependent on it but that didn’t result into any success. So finally I started looking into ULS logs by hoping will get something very concrete which will guide me in right direction towards resolution and I was damn right!

Here are the findings:
Template Discovery/InitScriptData: cannot get user profile, no UserProfileApplicationProxy exists in the current context     297b8263-3256-4f3b-bb62-a1ceb2d4600f
05/09/2014 15:29:31.57        w3wp.exe (0x1F34)                           0x2630       Web Content Management        Publishing                       7fz3   Medium       Setting [Display] as the FormContext.FormMode for the current page         297b8263-3256-4f3b-bb62-a1ceb2d4600f
05/09/2014 15:29:31.57        w3wp.exe (0x1F34)                           0x2630       Web Content Management        Publishing                       7fz3   Medium       Setting [Display] as the FormContext.FormMode for the current page         297b8263-3256-4f3b-bb62-a1ceb2d4600f
05/09/2014 15:29:31.62        w3wp.exe (0x1F34)                           0x2960       SharePoint Foundation            Monitoring                      b4ly   High            Leaving Monitored Scope (EnsureListItemsData). Execution Time=27.7202828851153   59cb65df-da26-4357-8f32-84a2cac755c5
05/09/2014 15:29:31.73        w3wp.exe (0x1F34)                           0x2630       SharePoint Foundation            Monitoring                      b4ly   High            Leaving Monitored Scope (DataBinding DataFormWebPart (CMS_RT)). Execution Time=138.975204949232          297b8263-3256-4f3b-bb62-a1ceb2d4600f
05/09/2014 15:29:31.81        OWSTIMER.EXE (0x3628)                            0x2D1C          SharePoint Foundation             Monitoring                      nasq  Medium       Entering monitored scope (Timer Job SchedulingUnpublish) 3a1381ea-de0d-4616-9c25-d06d19a650bf
05/09/2014 15:29:31.81        w3wp.exe (0x1F34)                           0x2960       SharePoint Foundation            Web Controls                            cm8z  Medium       Failed to get SPGroupName from GroupID. Error Message: Group cannot be found.  Callstack:    at Microsoft.SharePoint.SPGroupCollection.GetByID(Int32 id)     at Microsoft.SharePoint.WebControls.PeopleEditor.set_SharePointGroupID(Int32 value).          59cb65df-da26-4357-8f32-84a2cac755c5
05/09/2014 15:29:31.82        w3wp.exe (0x1F34)                           0x2960       at Microsoft.SharePoint.WebControls.PeopleEditor.set_SharePointGroupID(Int32 value).          59cb65df-da26-4357-8f32-84a2cac755c5
05/09/2014 15:29:31.82        w3wp.exe (0x1F34)  0x2960   

From these findings, I know where to check and what should be change! And I would like to share the same details with all of you because after making that change, your issue will be resolved.

Note: before I mentioned the exact details, make sure that you have the “user profile web service application” exist in your environment.

Resolution:
1.   Open the Central Administration
2.   Application management
3.   Service Applications
4.   Configure Service Application Associations
5.   Check the web application in which your site exist
6.   Check the “Application Proxy Group” column
7.   Click on the custom group / default group
8.   Tick the User profile service application check box
9.   Click OK

That’s it – You are done!

Note:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

Product Applies To:
a)   SharePoint Server 2010
b)   SharePoint Server 2013

Database has large amounts of unused space


While monitoring the SharePoint health analyzer, I came across this error - Database has large amounts of unused space


Following databases have large amounts of space allocated on the disk but not in use. This may be due to recent deletion of data form the database, or because the database has been pre-grown to a larger size. This database will take up a larger amount of space on the file system unless it is shrunk down to a smaller size.

The database can be shrunk in size using the DBCC ShrinkDatabase command or the Shrink Database wizard in SQL Server Management Studio.

There are some errors on which you really need to take an action but this one you can safely ignore! – Yes, you heard it correct. This is not a critical error and there is no harm in ignoring this error.

If you really want to take an action then you can simply shrink the database. In the above error, you will see the name of the database for which its failing so take the action and you are done.

Resolution:
Two ways – Either by SQL way or Central Administration (CA) way to remove this error from the Health Analyzer!

SQL way:
1.   Login to the SQL management studio
2.   Right click on the failing database
3.   Shrink it.

CA way:
1)   Open the Central Administration
2)   Click on the health analyzer list
3)   Click on the rule which is showing this error
4)   Click Repair automatically option which is on the top ribbon -> Once you click on it then wait for few mins i.e. give some time to execute that job properly
5)   Now there is a time “Reanalyze Now”

If you have any queries / questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

Note:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Product Applies To:
a)   SharePoint Server 2010
b)   SharePoint Foundation 2010

Reference:

08 May, 2014

Configure user profile synchronization service sharepoint 2010 - Part 1

Profile Synchronization in SharePoint Server 2010 enables an administrator of an instance of the User Profile service to synchronize the user and group profile information that is stored in the SharePoint Server 2010 profile store with profile information that is stored in directory services and business system across the enterprise. 

Profile Synchronization can occur when profile information has changed in the SharePoint Server 2010 profile store or when profile information has changed in the directory service.

Start the User Profile Service Application
Open the SharePoint 2010 Central Administration home page; in the system settings click Manage Service on Server, in the service column locate the user profile synchronization service

Note: The current status of the service is stopped; by default, the service is not started.


Click Start on the User Profile Synchronization Service row.

On the User Profile Synchronization Service Page, in the Select User Profile Application Section, make sure User Profile Service Application is selected.

In the Service Account Name and Password Section, in the password and confirm password boxes, populate the password and click ‘Ok’.


Note: The Current Status of the service is starting.

Refresh the page until status is started.

Close Central Administration.

Verify the Forefront Identity Manager Synchronization Service and Forefront Identity Manager Service Are Running in Services (Run -> services.msc)

Before Proceeding with the Configuration of the User Profile Synchronization Service, we need to verify all the supporting services have started.

The Forefront Identity Manager Synchronization Service and Forefront Identity Manager Service are started automatically when the User Profile Synchronization Service is started.


Verify the Creation of the User Profile Synchronization Service Folders

These folders are created automatically, when the user profile synchronization service is started.

Open Windows Explorer, and navigate to C:\Program files\Microsoft Office Servers\14.0\Synchronization Service\MaData

This folder contains the folders required by the User Profile Synchronization Service:

-ILMMA

-MOSS-User-Profile-Service-Application

-MOSSAD-People

These folders will be empty until the User Profile Synchronization Service Configuration is complete and user profiles are synchronized.

RUN IISRESET

Restart the Internet Information Service on the server where the User Profile Synchronization service is provisioned before configuration changes will take effect. Restarting IIS is a Server action. When we restart the internet Service, all sessions connected to our Web Server (Including Internet, FTP, SMTP, and NNTP) are dropped. Any data held in Web Application is lost. We should take appropriate action to ensure that data loss and user interruptions are kept to a minimum.

Open Command Prompt à Type IISRESET



07 May, 2014

The paging file size should exceed the amount of physical RAM in the system

I have configured a new farm for the SharePoint 2010 and noticed this error in the health analyzer! – Strange as it’s completely new environment and most of us would think the same as why the new built farm showing such error! But we would like to understand the “Under the hood” description for this error.

Error message:
The paging file size should exceed the amount of physical RAM in the system

Reference:

When you put a paging file on its own partition, the paging file does not become fragmented, and this counts as another definite advantage. If a paging file resides on a partition that contains other data, it may experience fragmentation as it expands to satisfy the extra virtual memory that is required. An unfragmented paging file leads to faster virtual memory access and to a greater chance of a dump-file capture that is free of significant errors.

Resolution:
1.   User account should be the member of the Administrators group on the local computer.
2.   On the Server Manager page, click Change System Properties.
3.   System Properties -> on the advanced tab -> Performance section -> click Settings.
4.   Performance Options box -> on the advanced tab -> in the Virtual memory section -> click Change.
5.   Virtual Memory box -> select the Automatically manage paging file size for all drives check box, or clear the check box and specify a paging file size that is equal to or greater than the physical memory that is available on the computer. We recommend that you either allow the system to manage the page file size or to set it at 150% of the size of the physical RAM.
6.   Click OK
7.   Restart the computer to apply the changes.

In case of any questions / queries then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.