SharePoint 2013 Apps – Missing Styling

So by now you should have played with Apps in SharePoint 2013. Whether you created your own or used a free/paid one from the store either way you should have by now. A couple of little things that can be a pain are to do with styling of apps within a SharePoint site.

I have seen this issue in many environments:

  

This issue is caused when someone sets the master page using the default option and sets it to push down to all sites.

  

This only happens when you set the system master page this way, setting the publishing page one does not affect it. To resolve this you can access the master page changer page using the following URL:

“/_layouts/15/ChangeSiteMasterPage.aspx

You can also run PowerShell that will set the “CustomMasterUrl” back to what it should be.

  

The next issue I have seen is when everything looks to be setup correctly but when the app is deployed and you render the app is seems to be missing CSS, JavaScript and even Master Page layout.

  

This issue seems to be caused by using different application pool accounts. In the environment I am using right now I have the following:

Web Application

Application Pool

Account

Portal

Portal_AppPool

SPS\SP_SiteAppPool

My Sites

MySite_AppPool

SPS\SP_ProfileAppPool

Apps

Apps_AppPool

SPS\SP_AppPool

As you can see I am using different accounts for each application pool. In this configuration my accounts are running least privilege and causing the problem with the user interface. I change the application pools to be the following:

Web Application

Application Pool

Account

Portal

Portal_AppPool

SPS\SP_SiteAppPool

My Sites

MySite_AppPool

SPS\SP_ProfileAppPool

Apps

Apps_AppPool

SPS\SP_SiteAppPool

This resolves my problem and the apps now load as expected. Now of course you would probably want to keep everything isolated potentially by application pool and account so this may not be the ideal solution. The other approach is to grant permission to the Web Application for the App Web specifically to the application pool account you are using the “User Policy” option in Central Administration.

  

As a note I found that simply adding the user account, refreshing it and then removing it from the user policy meant it worked perfectly fine.

  

Hope this helps.

Liam Cleary

Liam began his career as a Trainer of all things computer related. He quickly realized that programming, breaking, and hacking was a lot more fun. He spent the next few years working within core infrastructure and security services until he found SharePoint. He is the founder and owner of SharePlicity, a consulting company that focuses on all areas of Technology. His role within SharePlicity is to help organizations implement technology that will enhance internal and external collaboration, document and records management, automate business processes and of course security controls and protection. Liam also serves as the Product Owner for Security at Rencore, where he is helping to develop offerings that help organizations further understand and mitigate security and compliance risks, within SharePoint and Office 365 customizations. His core focus will is to identify, control and protect whether they are full-fledged customizations or out-of-the-box Office 365 functionality. He is also a twelve-time Microsoft MVP focusing on Architecture but also crosses the boundary into Development. His specialty over the past few years has been security in SharePoint and its surrounding platforms. He can often be found at user groups or conferences speaking, offering advice, spending time in the community, teaching his kids how to code, raspberry PI programming, hacking the planet or building Lego robots.

You may also like...