It’s been some time since my last blog post. This had mostly to do with some personal changes in my life and not really having interesting topics. But since that last post I’ve seen some “error in thinking” that most SP developers did, that I’ve decided to write a blog series about writing code and more importantly, writing code that does the job quicker or better (improving code quality).

Keep in mind that I never criticize the code of other developers, you never know in what mindset the code has been written. Were they on time pressure, lack of knowledge or is it more fundamental and they always write code the same way. Nothing is wrong with that, but as a consultant it is a good nature to question sometimes your own code and asking yourself, can’t this be done faster or is this the correct way?  

Continue reading

So today we had a nice issue to look into. After doing some patching of SharePoint (installing CU’s and SP1) we noticed that a certain site collection gave some issues with the CSWP.

Now we tested everything:

  • checking if query was actually giving results, it was the case , we would see results in the tests pane of the build query page
  • same query on a different site collection = works.
  • Ok, checking if all the site collection (site) features were activated, was (almost) the case
  • still nothing , very very strange

I forgot the cardinal rule, check ULS 🙂 … after doing this we noticed 2 lines with a high level

SearchDriven 

Enable-SPFeature –ID 592ccb4a-9304-49ab-aab1-66638198bb58 –Url (URL of the Site coll giving the issue)

Et voila it was working all ok 🙂 Hope it helps

Strange part was that the CSWP was selectable to add to the page and all… No clue why it was depending on this feature to display the results.

 

Well since SharePoint is such a big platform It is only natural that we display some curiosity to the other. Going from development to infra seems a big step and most people are reluctant to even look at the infra side of SharePoint. Most developers I know say that they don”t want and need to look at this side of SharePoint. Well here I believe they are wrong, as a developer it is more and more important that we know about the infra side of things. Not that we need to fully understand this side, but at least we have to  know the basics. With the app model It is becoming more clear that only coding isn”t sufficient to understand the platform.

Since I am doing more and more infra here a few things I have seen a lot and almost nobody that fixes them, while it is such an easy solution.

First Issue: Central admin is only accessible from the APP server and not from the WFE.

I see at many clients the same issue coming back every time. The administrator can access the central admin from the app server, but not from any other server. A credentials window comes up 3 times and doesn”t show anything.

But before I just tell you the solution.. Let”s do some investigation first..

Fiddler is your best friend in this.. I needed to know what happened with those authentication windows and why no page was shown.

So fired up my servers and using fiddler and IE to navigate to my CA address and see what”s happening.

Servers

IENotWorking

At this point it was clear that this wouldn”t work what so ever, going to test with another browser (Firefox in this case). And surprise , Firefox came with a credential question, filled in all the data and CA was loaded. Strange

FirefoxWorks

FirefoxWorksFiddler

As you can see, the authorization headers and authentication headers are different with IE and Firefox. The first one goes for ‘Negotiated’ and Firefox uses ‘NTML’.

Ok going to check the authentication provider on the CA web application…

CAAuthProvSettings

CAAuthProvSettings2

And just as I expected it was set to negotiate. Changed this to NTML and low and behold I could log in via the Web front end server to the CA.

ItWorks

Hope it helps for someone and that they don”t keep going to the App server just to be able to log on to the CA.

Edit 09/04/2014

Some time ago a buddy of mine (Koen Vosters, MSC) read this blog and noted a small issue with it.

1. The strange part is that it supposed to be negotiated, so meaning if Kerberos is not working, IE should fall back to the NTML way.

2. I should have defined SPN if I am using Kerberos.

  1. Apps, Apps And Apps … A Story (Step 1)
  2. Apps, Apps And Apps … A Story (Step 2) – Commenting App – this blog
  3. Apps, Apps And Apps … A Story (Step 2b) – Commenting App Going AngularJS

So in the previous blog post we”ve created a SharePoint App with an Office App embedded, this is called a composite model.

Now we are going to create a real life example of this model that has a way of commenting an entire document.

Continue reading

  1. Apps, Apps And Apps … A Story (Step 1) – this blog
  2. Apps, Apps And Apps … A Story (Step 2) – Commenting App
  3. Apps, Apps And Apps … A Story (Step 2b) – Commenting App Going AngularJS

A few weeks ago I gave a presentation about SharePoint Apps and Office apps combined on the SharePoint Connections: Amsterdam conference.

It was lots of fun and I always love meeting new people.

I’ve mentioned I would put my slides and my code up on my blog. Which I did of course Glimlach  .

Now I’m going to create a small blog series about the 2 technologies and combining them together. In the end it’s really not that hard and opens a world of additional possibilities that the SharePoint Apps mechanism already provides.

If you don”t know what Apps for Office are I suggest reading the technet article first.

Also if you want to know more about AngularJS there are 2 blog posts you can read:

I am using Visual Studio 2013 but it should be the same with Visual Studio 2012.

Continue reading

So yesterday evening I had to give a presentation about Apps.

This was more of an intro session into Apps but it gave you a general knowledge about all the aspects that come with the App model. It wasn’t ment to go deepdive into every part, but more a high level overview.

I’ve uploaded my presentation to skydrive so you can download it.

Hope it helps

have a nice day

 

Chalkboard-610

Hey guys

I’ve found a couple of new things over the weekend.

First:

TechEd was last week and already new SharePoint 2013 content is online for us to view at channel 9:

Microsoft Office & SharePoint 2013 Development: Introduction to the New Cloud App Model

Developing Apps for Microsoft SharePoint 2013 with Microsoft Visual Studio 2012

Deliver Adaptive and Personalized Experiences with Microsoft SharePoint 2013

Overview of Business Intelligence in Microsoft Office and SharePoint 2013

IaaS: Hosting a Microsoft SharePoint 2013 Farm on Windows Azure

0 to 60: Developing Apps for Microsoft SharePoint 2013

Search Architecture, Sizing, and Migration in Microsoft SharePoint 2013

Microsoft SharePoint 2013 Sharing and Security

Microsoft SharePoint 2013 and Office 365 Upgrade and Migration: Strategy and Tactics

Exam Prep: 70-331 and 70-332 – MCSE: SharePoint (Microsoft SharePoint Server 2013)

Testing and Debugging Microsoft SharePoint Applications with Microsoft Visual Studio 2012

The Only Way to Go Is Up! Upgrade to Microsoft SharePoint 2013

Real SharePoint Apps, Real Fast with the New Microsoft Access 2013

Step by Step: Search Development in Microsoft SharePoint 2013

Building Modern, HTML5-based Business Apps for SharePoint 2013 with Visual Studio LightSwitch

Microsoft SharePoint 2013 Administration

Tips You Need to Know for Creating Apps for Microsoft Office and SharePoint 2013

Understanding the Fundamentals of SharePoint Claims-Based Authentication

Sharing is caring Smile

At the moment I’m sitting in the Gman garage in Antwerpen waiting on my car to be fixed. So excellent time to write some blog posts that I’ve been putting off for too long now.

Some time ago there was a problem at the client with a list of 10-20k items big. The discussion on how large a list is and should it be put in SP I’ll leave for another time, so the list was there and we had to solve it.

A simple query in an xsltlistviewwebpart would be the beginning of a big issue.

I’ve added some very interesting reads at the bottom of this article but all didn’t solve my issue.

Below was one of the first issues that we had.

Error_ItemLevelPermission

If you Google this one, a lot will tell, just set the threshold of the web application higher.

well, first ask yourself, why is this limit 5000 items?

To minimize database contention, SQL Server uses row-level locking as a strategy to ensure accurate updates without adversely affecting users who are accessing other rows. However, if a read or write database operation, such as a query, causes more than 5,000 rows to be locked at the same time, then it is more efficient for SQL Server to escalate the lock to the entire table until the database operation is completed. When this lock escalation occurs, it prevents other users from accessing the table

This small part in a very large blog article on Technet explains why.

Meanwhile the threshold was already set at 55000 items on production = NOT GOOD

Sure it solved the issue for a while but it created others elsewhere.

So back to the drawing board, why do we have this issue. Why is a query generating this particular error.

I will spare you the details on looking into this issue and skip to the solution.

It was because not only these 10k-20k large list was big but also all the items in it had broken security. So we had item level security in place. This is why we had this issue.

A little re engineering later (using folders with broken security and putting the items in those folders solved it) and all was good to go. From 20k items we went to 35 folders with broken security and the query would run nicely now.

A fun fact: working with large lists it’s often suggested to use the content iterator. Well the content iterator in the back-end applies a row limit, recursive node and listitemcollectionposition. In doing so it queries in batches but uses SPQuery just as well.

So CAML isn’t dead yet hehehe

 

Sneak preview: Did you know that our Caml Designer 2013 now supports SP 2010 as well, so you can work with the newly (and cool) designed CamlDesigner 2013 on both SharePoint versions. (Release is planned for 27 April).

 

Some good reading:

I’ve divided this into a table because of the many SharePoint versions:

Title (link to articles)

SharePoint Version

Comments

Software boundaries for large lists in SharePoint
2013

2013

 

Manage lists and libraries with many items

2013 & Office 365

 

Must do course

2013

 

Technet article

2010

 

Blog article from Steve Peschka

2010

 

Blog article from joel oleson

2010

 

Blog article from the SharePointBaker
(a buddy of mine 😉 )

2010

 

Working with large lists

WSS 3.0

It says WSS 3.0 but it still applies for the other
versions

Official read

2007