Living a SharePoint life

Showing posts with label Error. Show all posts
Showing posts with label Error. Show all posts

Tuesday, January 17, 2017

Connect to Office365 via Office PnP behind a proxy

How do you connect to your SharePoint Office365 tenant with the PowerShell if you are locked behind a proxy? This hint will probably work for all kind of PowerShell scripts, not only for Office PnP. I tried this with the Microsoft SharePoint Online extensions as well and it worked.

So my problem was, the company I was working for, had a proxy which could not be bypassed. The proxy settings have been set by a GPO and the network settings where fine so far. However the proxy used user authentication to access the internet. Now if I want to use the SharePoint Online tools, I must authenticate my PowerShell session at the proxy so the tools can access the internet too.

The trick to get your PowerShell connected is quite simple. You only need to enter the following line:

[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials

Now you should be able to connect to Office365 SharePoint without problems. If you don't want to enter this line every time you open a new PowerShell, you could add it to your PowerShell profile.

ise $PROFILE
then add this to the profile file:

#Set user default credentials for any webrequest
"Setting the users default credentials for WebRequests..." | Write-Host -ForegroundColor White
[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials

Thursday, January 5, 2017

A certificate validation operation took nnn milliseconds and has exceeded the execution time threshold

After installing a new SharePoint 2013 farm, I noticed a few messages in the Windows event log:

A certificate validation operation took 14988.6926 milliseconds and has exceeded the execution time threshold. If this continues to occur, it may represent a configuration issue. Please see http://go.microsoft.com/fwlink/?LinkId=246987 for more details.
Source: SharePoint Foundation
Event ID: 8321
Level: Critical

As Microsoft states in their knowlege base article KB2625048:

The SharePoint server does not have access to the Internet, or the server is protected by a firewall that has limited ports open. In this situation, users intermittently experience long delays when they perform certain operations, such as logging in to the site or performing a search. Users may also encounter HTTP timeouts when they perform these operations.

The mean you must either let your server access the internet, what most of the time won't be possible due to policy reasons, or we need a other solution. Good for us that the knowlege base article offers two possible solutions.

Wednesday, August 3, 2016

Bug hunter: Could not create the site from the context

Today a colleague approached with an interesting problem. The SharePoint farm consist of two server, which both serve as a web frontend server. One of the two acts as the application server. When he opens a specific site collection, the first SharePoint node returns the page as expected, the other node however just returns a 404.

This post is

Tuesday, March 22, 2016

SharePoint HRESULT: 0x80131904 list error

Recently a customer of mine had a problem creating new entries in SharePoint lists. Everytime he tried to add a new entry to a list, SharePoint returned an error with HRESULT: 0x80131904

After some research in the windows logs, it became quite clear that the SQL server transaction logs have exhausted the entire disk space on the SQL server. So we cleared the transactions by backup, shrunk the size afterwards and the errors were gone.

Monday, September 14, 2015

Trickshots: Testing a SQL connection quick and easy

Did you ever need to test a SQL connection? As a SharePoint Pro you probably have. I found a nice little trick on Steve Rachui's Blog today I’d like to share with you.

Create a new text file on the desktop of the machine you will try to connect to the SQL server. Name the file whatever you like, but rename the file into UDL. Double click on the file and a dialog pops up with SQL connection settings. Enter your connection settings and use the Test Connection button in the lower end of the dialog.

If you need to test a different SQL server port (not 1433), simply create a SQL alias on the machine and test against the alias.

Thursday, November 20, 2014

Remove the performance breaks when using VMWare 5.0 and Windows Cluster services


There are probably a lot of SharePoint Farms that use a Microsoft SQL cluster. Even now with new possibilities like Always-On for SQL 2012. But not only if you use SharePoint might this be of interest for you.

About a year ago, a customer of mine had some very bad performance with his SQL Server. The SQL was version 2008 R2 using the Windows Cluster Service hosted on a VMWare ESX 5.0 private cloud. Nothing unusual and of course the first thoughts were pointing to the VMWare servers. But let’s take a look at the performance test we performed on the cluster.

Thursday, September 25, 2014

Opening Word file from SharePoint 2010 causes Office to crash

Today I wasn’t able to open a Word file from the SharePoint Server. Every time I opened the document from the server, Word crashed. Saving the file to disk and opening it then worked just fine. What made it even worse was that SharePoint thought the file was opened exclusive for my user account and I couldn’t do any action on the file on the server e.g. deleting. Bugs! I don’t like them, but it’s always a good feeling when you found out how to get rid of ‘em.

Featured Post

How are Microsoft Search quota consumed?

With Office 365 Search, Microsoft has created a central entry point for the modern workplace. In one convenient spot, users can access all ...