Showing posts with label SharePoint 2013. Show all posts
Showing posts with label SharePoint 2013. Show all posts

Thursday, 9 April 2020

SharePoint 2013 ::: IIS Config file is corrupted

Hi all,

Issue with IIS while opening the Application Pool





Checked the config file, and it was corrupted.

Solution:

1- Check when the file was last modified
2- Find the last correct file in the history folder of  your <drive>:\inetpub\history
3- stop iis : iisreset /stop
4- Copy the last correct backup file
5- start iis : iisreset /start
6- Check that the application pools are started in IIS Manager
7- Check the different Web Applications


Voilà,

That’s all Folks !!!

Monday, 7 January 2019

"An update conflict has occurred, and you must re-try this action" in SharePoint

Hi all,

I was facing this issue when trying to run manually a timer job from the Central Administration GUI.

According to Microsoft, I've clear the cache of SharePoint only from 1 server of my Farm.
I've 4 servers in that Farm, and I had to clear the cache on each servers in my Farm.

This article explain how to clear the cache config, but the path mentioned is specific for SharePoint 2007:
https://support.microsoft.com/en-us/help/939308/error-message-when-you-try-to-modify-or-to-delete-an-alternate-access

Use this article for the path for SharePoint 2010, 2013 and 2016:

https://gallery.technet.microsoft.com/office/SharePoint-2010-2013-21f55320

1- Stop SharePoint Timer Job Service
2- Navigate to : C:\ProgramData\Microsoft\SharePoint\Config
3- Locate the GUID folder that has the file "Cache.ini", and the .xml files
4- Create a Backup folder
     Move all *.xml files into the Backup folder
     Copy the Cache.ini into the backup folder
5- Edit the Cache.ini (from the GUID folder)
     Select ALL, type 1
     Save the Cache.ini file
6- Restart the SharePoint Timer Job, and check that the cache .xml files are created again

Proceed those steps on each servers in your Farm.


Voilà,

That’s all Folks !!!

Monday, 5 November 2018

SharePoint 2013 ::: Event ID 6482 ::: An update conflict has occured

Hi all,

Today, I'm facing with Event ID 6482, indicating that the job is failing due to an update conflict.



The resolution for this issue is to delete ALL .xml files where the mentioned file is located.


1. Finding the filename:
The first line give the file name of the .xml file to find. The name is located into the brackets at the end of the line:
service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (a5744ce1-d592-42fc-a081-82188cbee126).

2. Stop the "SharePoint Timer Service"

3. Browse on each servers of your farm to this path:
C:\ProgramData\Microsoft\SharePoint\Config

4. Delete all .xml files present into the folder where .xml files are located (the other folder does contain  ".PERSISTEDFILES" : do not toutch them)

5. Edit the file "Cache.ini", and write down the number "1"

6. Save the "Cache.ini" file

7. Repeat steps 2 to 6 on each servers of your farm

8. Restart the "SharePoint Timer Service" on each servers of your farm.

9. Check that all cache files are automatically recreated.

10. Check that the file "Cache.ini" contains another number then "1"



==> Problem solved.




Voilà,


That’s all Folks !!

Tuesday, 23 October 2018

SharePoint 2013 ::: .NET Server Error ::: Event ID 1023


Hi all,

Today, I'm checking one of my Farms, in my test environment, and while opening Central Administration site, I was faced to this nice Runtime Error:




Following this discover, I've tested to access to the Farm via PowerShell commands.

- First, let's load the SharePoint snapin:
          add-pssnapin Microsoft.SharePoint.PowerShell
     ==> no errors, ths it means that my farm isn't broken.

- Secondly, let's check the Farm version:
     ==> (Get-SPFarm).buildversion

Major  Minor  Build  Revision
-----  -----  -----  --------
15     0      4957   1000   


Ok, defenitely, it is not a SharePoint Farm issue.

Then, I saw some .NET Runtime (Event ID 1023) errors in the Event Viewer.
After googleling a little bit, I found the solution explained by Bryan Peters in this post.

I've made the exactly same procedure, on my both servers, and the Farm is back to live.

Create a new DWORD, followed by an IIS Reset:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
New registry DWORD : LoaderOptimization
Value : 1
IIS Reset


==> Problem solved.




Voilà,


That’s all Folks !!

Tuesday, 20 December 2016

SharePoint 2013 ::: How to restore the deleted "Suggested sites to follow" Web Part from a user's MySite

Hi all,

Today’s challenge is to restore the Web Part “Suggested sites to follow” that was deleted by the user himself.

So, do not lose your time in trying to find the Web Part in the Add Web Part page of the mySite, it is not available.



The script, provided by Microsoft, that put me on the track is:

Add-PsSnapin Microsoft.SharePoint.PowerShell
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.WebPartPages")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Publishing")

$useraccount = "useraccount"
$url = "http://" + [System.Net.Dns]::GetHostName() + "/my/personal/" + $useraccount
$site = get-spsite $url
$web = $site.RootWeb
$pageUrl= "Social/Sites.aspx"
$webPartManager =  $web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared);
$webPart = $webPartManager.WebParts | where-object { $_.WebBrowsableObject.GetType().Name -eq "ProjectSearchBrowseWebpart" }

if($webPart -ne $null)
{
    $webPartManager.DeleteWebPart($webPart)
}
$web.Update();


In the script, I found the name of the Web Part "ProjectSearchBrowseWebpart", and the page to find it.
Then, I decided to compare the code of both pages “Social/Sites.aspx” from my mySite and from the user’s mySite, using SharePoint Designer 2013.


I found then the difference at the end of the code:

Hereunder is the code from my mySite, and in yellow, the missing code in the user’s mySite code:

            <div class="ms-contentFollowing-sitesRightZone ms-tableCell ms-verticalAlignTop">
                <div class="ms-contentFollowing-bottomZoneContainer">
                    <WebPartPages:WebPartZone runat="server" FrameType="None" ID="RightZone" Title="<%$Resources:sps,LayoutPageZone_RightZone%>" Orientation="Vertical"><ZoneTemplate>
                                                                           <SPSWC:ProjectSearchBrowseWebpart runat="server" CategoryString="Site" AllowEdit="False" ChromeType="TitleOnly" Description="The recommendations web part suggests content a user may wish to follow within a farm." Title="Suggested sites to follow" ID="projectSearchBrowseWebPart" __MarkupType="vsattributemarkup" __WebPartId="{344EF58F-509A-3DE1-T3DG-ID0T674FOR6Z}" WebPart="true" __designer:IsClosed="false" partorder="2"></SPSWC:ProjectSearchBrowseWebpart>

                                                                           </ZoneTemplate></WebPartPages:WebPartZone>
                </div>
            </div>
        </div>
    </div>
</asp:Content>


So, I simply made a copy/paste of the missing line, save the user’s “Social/Sites.aspx” page, and made a refresh of his mySite in the browser.

 ==>Problem solved.





Voilà,


That’s all Folks !!!

Monday, 9 November 2015

Why a Content DataBase is not cleaning the free space after Move-SPSite or Delete-SPSite?

Hi all,

I was faced to a full Database, and the quick-win solution, was to move some sites to another Database.

After making the list of the site collection present in the database, I found that the moved sites were no more present, as expexted.
But on the SQL side, the Database was still full…

I’ve asked our SQL Team to Shrink the Database, but nothing was changed.

Then, I’ve search why the space used by the moved sites was not cleared by the Timer Job.
Timer Job… The Gradual Site Delete timer job.

I’ve found why the Database didn’t change the free space after moving sites.
The timer job in SharePoint wasn’t correctly set.

After checking, the job supposed to be run automatically every day from 10PM to 6AM, but it wasn’t run.


Reason: start time is before end time. Seems that Microsoft logic is … special.

In the drop down list, the time for the timer job (same problem for all timer jobs in all SharePoint versions) start at 12AM and ends at 11PM.

The problem, is that by default, the Gradual Site Delete timer job is set as below: from 10PM to 6AM
This is quite logic for us (human), but I’ve the impression that the timer job doesn’t see the 6AM after 10PM in the drop-down list.
Also, I found that clicking on the “Run Now” button didn’t free the space in the concerned Database.


Thus, this default setting seems not allowing the Timer Job to run:




Solution: instead  of starting at 10PM, I’ve set it to start at 12AM
                                Now, no more red warning message.
                                And clicking on “Run Now” button is directly clearing the free space of all the                                      databases of my Web App.




So, I’ve had to check all my Gradual Site Delete timer job for each Web App I have.
Also, I found this problem to my SharePoint 2010 Farm and my brand new SharePoint 2013 Farms.


Hope this could help.



That’s all Folks


Wednesday, 26 August 2015

SharePoint 2013 returns to 'upgrade required' status

Hi all,

This post is related to the fact that after upgrading your SharePoint Farm with success, you are faced again with some servers in the "Upgrade Required" status.

As this issue was still coming and coming after each try to re-upgrade my farm, I decided to open a case at Microsoft support.

So, hereunder, you can find the resolution steps that will bring your smile back.


In summary, if one or several servers (my production farm is composed by 25 servers) are going back to the "Upgrade Required" after being marked as "No Action Required" during few days, check first if you don't have some sites that were not upgraded.
In this case, only 1 Site Collection wasn't correctly upgraded, and after a manual upgrade (via powershell cmdlets), all was solved.



Here is the case summary for your records:
==================
Title: SHP2013 returns to 'upgrade required' status
Severity: B
Status: Resolved and Closed

ACTION/RESULT:
Customer reported that after completing the upgrade to CU December 2014 (more than once) on the SharePoint 2013 farm - some the "Servers in this Farm" were still showing "Upgrade Required"

CAUSE/RESOLUTION:
In a previous upgrade attempt, there was the indication of a Site Collection that was not provisioned correctly:
07-24-2015 13:12:59.59 OWSTIMER (0x1CEC) 0x1F5C SharePoint Foundation Upgrade SPSiteWssSequence alsj5 WARNING SPWeb [https://mysite.sharepoint.me/sites/myname] [MyName, MyFirstName] is in a partially provisioned state. 021f1d9d-33b4-00ca-36cd-9ce05d7b2e40

Running (Get-SPSite https://mysite.sharepoint.me/sites/myname).NeedsUpgrade showed that this needs to be upgraded.
Customer ran the script:
$dir = Get-Location
$file = "$dir\farmSCUpgradeRequired.txt"

#Sites
Get-SPWebApplication -includecentraladministration | ForEach-Object {
               $webappurl = $_.Url
               $_.Sites | ForEach-Object {
                              "{0};{1};{2}" -f $webappurl, $_.URL, $_.NeedsUpgrade
               }
} | Out-File $file
This showed that the site collection mentioned before was in fact the only one needing an upgrade.

Customer run the powershell command:
  Upgrade-SPSite https://mysite.sharepoint.me/sites/myname -versionupgrade

The Site Collection was upgraded successfully.

After this, customer ran the "Product Version Job" timer job, and only 2 servers were still showing "Upgrade Required".
Running "stsadm -o localupgradestatus" showed only for these 2 servers, the following error message:
  <object>
    <name>Sharepoint_SA_UserProfile_Profile</name>
    <type>Microsoft.Office.Server.Administration.ProfileDatabase</type>
    <level>2</level>
    <status>Cannot Upgrade</status>
  </object>
  <object>
    <name>Sharepoint_SA_UserProfile_Social</name>
    <type>Microsoft.Office.Server.Administration.SocialDatabase</type>
    <level>2</level>
    <status>Cannot Upgrade</status>
  </object>

This means that the servers had something different than the rest of the servers, as the Databases were already up to date.
Running Get-SPDatabase | where {$_.Name -like "*UserProfile*"} | ft Name, NeedsUpgrade, NeedsUpgradeIncludeChildren, CanUpgrade also showed the information for these databases on the affected servers.

As this issue could only be on the servers, running the Configuration Wizard on both affected servers, made the message "Upgrade Required" go away.
After some days, the servers are still on a stable state.
=================



That's all folks

Monday, 11 May 2015

Search did not provide new items

Hi All,


Today, I’ll talk about the Search issue I had few weeks ago.

This started on our SharePoint 2010 production Farm, with complain from users that weren’t able to find they newly added documents in the Search box.
At the beginning, I was asking them to wait until next working day, as the Incremental Crawl was running.

Then, days passed, and more and more users were complaining again and again.

Checking the server was showing that the Incremental Crawl were running, but really slowly.
Every days, I was receiving tickets about the usage of the CPU of my crawl server that was stuck at 100%.

When reading over the web, I discovered that the Crawl engine was using all the CPU while crawling.
This was driving me to the wrong path, and letting my server going deeper in the “glue”

I started to pause all the Content Sources, except one, but nothing seems to unstruck the index crawl.

So, I started to think about this problem, and facing Incremental Crawl of more than 300 hours, I decided to call Microsoft for having their support.
First of all, they confirmed that the Crawl process is using 100% of the available CPU, even if you add more and more CPU.
But the advantage, is that the Crawling Time is reduced.

Then, Microsoft asked me to run the Diagnostic Tool on my Service Farm, and they first pointed out that my servers were not fitting to the minimum hardware requirements: 2CPU + 40Gb HDD.

Then, I made a CPU and HDD upgrade: 4CPU + 270Gb HDD.

I started a Full Crawl of each Content Sources, then gradually, I’ve implemented the “Crawl Schedules” for each Content Sources.


Since last week, all the Content Sources are correctly crawling, and nobody is complaining.


So, this is the point to check when you have a search issue:
 - Number of CPU
 - Size of your log disk
 - Crawl Schedule starting at different time
 - Content DataBases are attached/detached, a Full Crawl must be performed (information given by Microsoft)



Voilà,


Thanks all folks

Tuesday, 31 March 2015

Confirm Site use and Deletion

Hi All,

Today, I spend time to check the Retention Time of an unused mySite.
One of my client was complaining that he received a mail reminder that his mySite will be deleted as there is no activity.

Here is the way to check in SharePoint 2013 (same as SharePoint 2010):

 - Step 1:


 - Step 2:



Et Voilà !!!



That’s all folks


Monday, 30 March 2015

How to install AppFabric when having Error 1603?

Hi all,

Today’s story is about an issue to install the AppFabric pre-requisite for a test stand-alone SharePoint 2013 Farm.


appfabric installation failed because installer msi returned with error code 1603


Checking the Environment path didn’t make me happy, as it was already correct.

Rebooting the server before trying again to manually install the AppFabric was another fail.


Then, I’ve decided to uninstall the AppFabric, reboot the server, then re-install the AppFabric:
   it woks like a charm !!!!


In the same way, I’ve patched the AppFabric up-to V1.1 CU5




Voilà,


Thanks all folks

Thursday, 11 December 2014

SharePoint 2013 Upgrade Check List

Hi all,

Today, I’ve put all together my SharePoint 2013 upgrade experience.

As I have lot of Farms to admin, in different environments (Prod, pre-Prod, Test), I was faced to several issues.
So, in the ease for everyone, I’ve tried to figure out all the issues I had to solve.

This post is divided in 2 Sections:
1.       Pre-Upgrade CheckList: this is mandatory prior every upgrade
2.       Installation Process: binaries, and how I proceed the upgrade
3.       Trouble shooting: if something is wrong, the solution should/must be in this section


1.       SharePoint 2013 pre-Upgrade CheckList:
- Farm & Install accounts must be DB Owner on all system & content DBs
- Farm & Install accounts must have Security Admin  on all system & content DBs
- If there is mirroring, it must be stopped
- If there is Availability Groups, all DBs must be removed from the A.G
     *Update1: the USAGE database must not be part of an A.G nor mirroring
        This DB name is found in the "Manage servers in this farm" section in Central Admin
        The usage database name is like: <db_name>-USAGE
     *Update2: the "SPPLA-AppManagement" DB must also be removed from the A.G or mirroring
     
- Copy all needed binaries that must be applied (CU, PU, SP)


2.       Installation Process:
- Logon each server with your Install account
- Launch the binaries installation (exe file). This step can take up to 2,5 hours.
- Reboot all servers
- Check in Central Administration GUI that all servers status are: Upgrade required
- Launch, on each servers the Configuration Wizard, but one step at a time.
   --> launch Configuration Wizard, click "yes"
   --> do the same for each servers of the Farm
- Click "Next" on your Central Admin Server (always start by the Central Admin server).
- When upgrade is finish, DO NOT click to exit.
  Select the next server, and click "Next" in the Configuration Wizard.
  Do the same process to all your server until the last one.
- When all servers are upgraded, close the Configuration Wizard (Next or Finish) and check the server status in the Central Administration GUI:
  "No Action Required"


3.       Trouble Shooting:

What to do if the upgrade fails?
1- Check event viewer for any Farm or Install account access denied in SQL
2- Check ULS
3- Execute the installation via the PSCONFIG cmdlet.

/!\ ..... UPDATE .....  /!\

               PSConfig.exe -cmd upgrade -inplace b2b -wait -force

According to Stefan Goßner, in SharePoint 2013, it is the best paractice to use the PSCONFIGUI.exe instead of PSCONFIG.exe
The reason is because the GUI version is doing more complete upgrade.

For any reason, if you need to use the PSCONFIG.exe, then use this cmdlet:
PSConfig.exe -cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures -cmd secureresources

/!\ ..... UPDATE .....  /!\


What to do if the Configuration Wizard is showing "Missing on <servername>"?
In the configuration Wizard, if there is some installed patches shown as "Missing on <servername>" (and they are already installed), you can use this PowerShell command :
Get-SPProduct -local
Then, press "Refresh" in the Configuration Wizard".
When the servers are no more in the list, you continue the patching process.

What to do if in the error logs (i.e : Upgrade-20141027-143441-40-error) you have this type of message?
Upgrade SPUpgradeSiteSession           ajxnj        ERROR
                at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
                at System.Net.HttpWebRequest.GetRequestStream()
                at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()

                ==> check that all Application Pools are up and running in IIS on all servers

What to do if you have Site Collection upgrade issue?
If you have this type of line in the error log:
ERROR   Pre-Upgrade [SPSite Url=<Your Site Collection URL/...] failed. Microsoft.SharePoint.Upgrade.SPSiteWssSequence has the ContinueOnFailiure bit set.
                ==> upgrade manually yours sites:
                Get-SPSite -Limit all | Where-Object {$_.NeedsUpgrade} | Upgrade-SPSite -VersionUpgrade -Unthrottled


*Update:
If you have this error with the previous cmdlet:

PS C:\Windows\system32> Get-SPSite -Limit all | Where-Object {$_.NeedsUpgrade} | Upgrade-SPSite -VersionUpgrade -Unthrottled
Get-SPSite : There was no endpoint listening at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.s
vc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if 
present, for more details.
At line:1 char:1
+ Get-SPSite -Limit all | Where-Object {$_.NeedsUpgrade} | Upgrade-SPSite -Version ...
+ ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...SPCmdletGetSite:SPCmdletGetSite) [Get-SPSite], Endpoint 
   NotFoundException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetSite

Check that those Services are running:
  - SPAdminV4
  - SPTimerV4
  - W3SVC

Reason:
 This is due to a faulty PSCONFIG.exe cmdlet.
 If the upgrade is not successfull, then the services are not started back.



That’s all folks




Sunday, 22 June 2014

Issue with SharePoint 2013 Farm Update

Hi all,

Last week, I was facing lot of issue applying the SharePoint 2013 SP1 upgrade.

First, was installing the binaries on each SharePoint 2013 server.
It took me an average on 2:30 hours per server.
The only advantage is that the binaries can be installed on each Farm server at the same time.

Then, I've prepared all my SharePoint Servers (15 servers ....) with the SharePoint Configuration Wizard.

At that moment, I was facing an extreme long long long configuration time for the Wizard.

Checking the sharepoint logs, I had only lines about PowerShell doing something... time to time.


After restarting the Wizard several times, and letting the Wizard working at his own way, I discovered that using the Configuration Wizard was not the solution.
Thus, I've decided to do the configuration via the psconfig.exe.
When there is an error, it shows clearly the issue.

Thus, I've discovered that executing the configuration wizard with the Install account gave issue in the database access.
When executing the configuration wizard with the Farm account, it gave insufficent access rights to some DB.

At that point, I've asked to our SQL Team to set the Farm and the Install account as dbo (db owner) to all DB's of the Farm.

Thus, executing the configuration wizard went without any issue, and each server was configured, one by one in less than 30 minutes each.


I've asked our Microsoft consultant about this issue, and he was not aware of the problem.
I've showed him my server, and he told me (before I discover the problem) that powershell was still working, and I have to wait....


So, before installing SP1 (or CU, or PU), do not forget to double check the access rights of your farm and install account.
Doing this will save you lot of time when installing SP, CU or PU in SharePoint 2013 (and in extension for SharePoint 2010)


Voilà, I hope it'll help you saving lot of time.


Job's done.

Tuesday, 25 February 2014

How to sign in as a different user in SharePoint 2013

Hi all,

Today I had to login to a SharePoint 2013 site with the farm account, from my desktop.

I simply add “/_layouts/closeConnection.aspx?loginasanotheruser=true” after the site URL :

http://MyProjectSite.contoso.com/Sites/Shp4DummiesProjects/_layouts/closeConnection.aspx?loginasanotheruser=true



Voilà,

That’s all Folks !!!

Monday, 27 January 2014

How to Limit the Self-Service Site Creation in SharePoint 2013 to only users added into a specific AD Group

Hi all,

Today, I was asked to allow the self-service site creation for the mySite in my SharePoint 2013 Farm.
As the audience will be only for the test users, I've decided to do in the same way as I've done for my SharePoint 2010 Farm.

1-      Creation of a new AD Group.
          


2-      Set the Self-Service Site Creation to "ON":
          In Central Administration, highlight the mySite Web App
          


          Select the MYSITE Web App, then review all 5 sections:
-          Self-Service Site Creation
-          User Permissions
-          User Policy
-          Anonymous Policy
-          Permission Policy


               

o   Self-Service Site Creation:
              

o   User Permissions: check this in the "Site Permissions" section
         

o   User Policy: use the default values

o   Anonymous Policy: use the default values

o   Permission Policy: use the default values




3-      Configuration of the User Profile Service Application:

In Central Administration, select the "Manage Service Applications" link:

In the "Service Applications" page, select the "User Profile Service Application":



            Now, select "Manage User Permissions" from the "People" section:
              
           From this Window, I've added my AD Group (in blue):

                


The settings for my AD Group is : thus, only users present in this AD Group will be able to create on demand their mySite when entering their mySite URL : http://mySite-uat.xxx.net
               

Do not forget to uncheck the "Create Personal Site" entry to all other groups, otherwise everybody from the organisation will be able to create his mySite.
               





That's all folks