Thursday, December 19, 2013

Workbook cannot be opened - Office Web Apps - SharePoint 2010

Article Referencing: Link
 

This is caused by the account running Excel Services not having proper permissions to the Content Database. When you upload an Excel workbook to a SharePoint library, the workbook is stored as blobs in the Content Database. When you choose to open this in Excel Services, the account running Excel Services needs to retrieve and reassemble the workbook. If the account running Excel Services lacks proper permissions, "The workbook cannot be opened".
We have a KB on how to resolve this issue:
The Excel Services Application for SharePoint 2010 does not load or display workbooks
In this blog, I will step you through this KB; where to collect data and explain what the two below SharePoint Management Shell Commands do:
$w = Get-SPWebApplication –Identity <URL of the Web application>
$w.GrantAccessToProcessIdentity("<insert service account>")
You need to find the <URL of the Web application>. To do this:
1. Browse to the report library where the failing workbook is located and make note of the URL.
2. Central Administration > Application Management > Manage web applications compare the URL to the list of Web Apps. Find the correct Web App URL and add it to “URL of the web application”.
You now have the first command:
$w = Get-SPWebApplication –Identity http://tschauer
3. Central Administration > Security > Configure Service Accounts > from the first dropdown, select the application pool running "Excel Services Application" and add that account where is says “<insert service account>”.

You now have the second command:
$w.GrantAccessToProcessIdentity("Devtest\Excel_Services_Account")
So now you can run these commands by following the below steps:
1. Click Start, click All Programs.
2. Click Microsoft SharePoint 2010/2013 Products.
3. Click SharePoint 2010/2013 Management Shell.
4. At the Windows PowerShell command prompt (PS C:\>), type the following command, and then press ENTER:
$w = Get-SPWebApplication –Identity http://tschauer
$w.GrantAccessToProcessIdentity("Devtest\Excel_Services_Account")
When you run these commands you are:
1. Adding the account running Excel Services as a User to the Content Database (Security > Users).
2. Giving the account running Excel Services the SPDataAccess Membership (Account > Membership)
3. Giving the account running Excel Services Full Control to the Web Application (Via "Policy for Web Application")


Do an iisreset after running the powershell command for change to go into affect.



Wednesday, December 11, 2013

Monday, November 4, 2013

User Profile Service Application - Synchroniaztion Connections Disappear

I came up against a strange scenario where a  created profile connection disappeared from the page as shown below.










I found that this was due to ‘Forefront Identity Manager Service’ had not automatically restarted upon reboot of the server.Open services.msc snap in locate the ‘Forefront Identity Manager Service’ service and start the service.









Simply refreshing the Synchronization Connections page made the connection reappear.

Tuesday, October 22, 2013

How to get the assembly public key token using Visual Studio 2012

Problem:
I have done the custom form authentication for SharePoint. For web.config change, I need the publickKeyToken.

Solutions:
1. In start menu, open “Developer Command Prompt for VS2012”
2. In command prompt type “sn –T” and drag and drop the dll from Windows Explorer to automatically enter the dll location...like below (Note: use –T instead of –t because case sensitive)

EXAMPLE
C:\Program Files (x86)\Microsoft Visual Studio 11.0>sn -T "C:\Users\ulrics1\Docu
ments\Visual Studio 2012\Projects\PMC.GlobalNav\PMC.GlobalNav\bin\Debug\PMC.Glob
alNav.dll"
Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.17929
Copyright (c) Microsoft Corporation.  All rights reserved.
Public key token is 487ed81b6367c7bd

Tuesday, August 20, 2013

Check-in Page Error in Pages Document Library


When trying to Check in a page into a Pages Document Library in a Publishing site getting an error and it won't check page in.



Error from ULS Viewer:
System.ArgumentException: Invalid SPListItem. The SPListItem provided is not compatible with a Publishing Page. 

Run Powershell to fix:
$web = get-spweb http://site-collection/path-to-affected-site
$correctId = $web.Lists["Pages"].ID
$web.AllProperties["__PagesListId"] = $correctId.ToString()
$web.Update()

$web.AllProperties["__PublishingFeatureActivated"] = "True"
$web.Update()

Thursday, June 13, 2013

Powershell Unhide User Information List


$WebUrl = "http://sandyportal2010"
$ListName = "User Information List"
$OpenWeb = Get-SPWeb $WebUrl
$List = $OpenWeb.Lists[$ListName]
$List.Hidden = $false
$List.Update()

The list will then show up in Lists under "View All Content" and in SharePoint Designer "Lists and Libraries" to create workflows on.

SharePoint Office WebApps

Helpful setup links:

http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=303
http://heidibrebels.be/blog/archives/2011/office-web-apps-error-sharepoint

Other Helpful Info:
-Default web app pool that you create service applications in (default SharePoint app pool) has to have access to content database.
-WebApps won't open xls (excel) extention documents only xlsx...will open xls in Excel Client

Monday, May 13, 2013

How to change SharePoint Web Application Name

In SharePoint Management Window:

$a=Get-SPWebApplication | where {$_.Name -match "Old web application name"}
$a.Name
$a.Name="New web application name"
$a.Update()
Get-SPWebApplication | where {$_.Name -match "New web application name"}

Thursday, March 21, 2013

SharePoint Alerts Work for some AD groups but not others

If I set up alerts for a list using an AD security group that has an E-mail set up in Exchange it works for some groups but not others.  You have to check a setting on the Exchange side per this info:

I know Exchange has an option to set distribution groups to only be available for use by "authenticated or trusted senders" (this prevents email/spam from the internet from being sent to internal distro groups). We ran into this problem, because SharePoint does not "authenticate" to the Exchange server, it is not, by default, trusted/authenticated.

Once you allow the distribution group in exchange to receive emails from un-authenticated users the Alerts will work.

Thursday, February 21, 2013

How to configure Incoming and Outgoing emails in SharePoint Server 2010

Reference Link

App_Offline.htm

Linked Reference

"App_Offline.htm" feature in ASP.NET 2.0, provides a super convenient way to bring down an ASP.NET application while you make changes to it (for example: updating a lot of content or making big changes to the site where you want to ensure that no users are accessing the application until all changes are done).
The way app_offline.htm works is that you place this file in the root of the application. When ASP.NET sees it, it will shut-down the app-domain for the application (and not restart it for requests) and instead send back the contents of the app_offline.htm file in response to all new dynamic requests for the application. When you are done updating the site, just delete the file and it will come back online.

One thing I pointed out in the talk that you want to keep an eye on is a feature of IE6 called "Show Friendly Http Errors". This can be configured in the Tools->Internet Options->Advanced tab within IE, and is on by default with IE6. When this is on, and a server returns a non HTTP-200 status code with less than 512 bytes of content, IE will not show the returned HTML and instead substitutes its own generic status code message (which personally I don't think is super friendly <g>).

So if you use the app_offline.htm feature, you should make sure you have at least 512 bytes of content within it to make sure that your HTML (instead of IE's friendly status message) shows up to your users. If you don't want to have a lot of text show-up on the page, one trick you can use is to just add an html client-side comment with some bogus content to push it over 512 bytes. For example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head>

<title>Site Under Construction</title>

</head>

<body>

<h1>Under Construction</h1>


<h2>Gone to Florida for the sun...</h2>


<!--

Adding additional hidden content so that IE Friendly Errors don't prevent

this message from displaying (note: it will show a "friendly" 404

error if the content isn't of a certain size).


<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

<h2>Gone to Florida for the sun...</h2>

-->

</body>

</html>

Wednesday, February 6, 2013

Automatically checkin files after uploading

In a typical document library of SharePoint, when use “Upload Multiple Files”, or use drag & drop in Explorer View, you can upload multiple files or folder easily. However sometimes the files are kept in “Checked out” mode and will not be available for others until they are checked in. Unfortunately SharePoint doesn’t have a “bulk check-in” function. So how do you have the files automatically checked in?

The key is in the setting “Require documents to be checked out before they can be edited” – this has to be “No”. Change it through “Document Library Settings”->”Versioning Settings”. The option is at the bottom.

Another setting that could prevent files to be auto checked in is the required columns. Make sure you turn off all mandatory columns, or give them a default value.
Other settings in “Versioning Settings” (such as Content Approval, version numbers etc) do not matter.

Tuesday, January 22, 2013

SharePoint Navigation (dropdown) IE Issues

Our SharePoint 2007 site is having problems displaying the dropdown menu options.  What I've found so far...

One Site's Suggestion:
Not sure if i've been having a problem with the same type of menu's but under 'Tools>Manage add-ons>Toolbars and Extensions' I had something called "NameCtrl Class" set to ENABLED. Once i disabled this my menu's started working again.

Prior to finding this i had played around with all my security settings (which had since been reset back to default) and played around with a bunch of other feature's in IE9 (again set back to the way they were). But if i flip the above back to ENABLED my menu's stop working again.

The extension is listed under "Microsoft Corporation" in the list, so I think it came from a windows update, but I haven't researched it so I don't know what it is or what it does.

Hope this helps.

Edit:

Before anyone mentions how it's silly to just disable something without knowing what it does.

NameCtrl class is an ActiveX control that will "Display presence information for people, integrating with Outlook (mail, calendar) and Communicator (instant messaging)". Now that i know this, I'm wondering if there is a correlation between this and MS Office 2010 having been installed around the time i noticed my menu's stop working.

Another Site:
Could you please fix IE 9.0! When I use IE 9.0 (x32) on WIndows 7 to view SharePoint (Enterprise Edition) pages (any page), I see that the IE 9 memory process grows by about 6 MB everytime I refresh the page or navigate to a new page. Since I work with clients that spend a lot of time on the SharePoint pages that I build for them, it means that local machine memory consumption goes up rapidly (100 clicks --> .6GB !) and they believe that SharePoint is slow and causes the browser to crash frequently.
I have done quite a bit of research on this issues and have concluded that the culprit is IE 9.0 (x32), most likely the add-in "NameCtrl Class."

Monday, January 21, 2013

Dll's on SharePoint Server to Reference

Was looking for Microsoft.Office.Server.UserProfiles.dll and found other SharePoint dll's as well here:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\

Friday, January 11, 2013

SharePoint Metadata Feature

To use managed metadata and term stores you have to enable this feature through PowerShell per site collection:

Enable-SPFeature -id “73EF14B1-13A9-416b-A9B5-ECECA2B0604C” -Url <SiteURL>

Then you will see the "Term Store Management" link in the Site Settings > Site Administration column.

Limit chars displayed in SharePoint List View

Here's how to do it, and yes it's a little complicated:

First, create a single-line text column, I'll call it Content

Second, create a calculated column, I'll call it ContentCalc, set the formula to =[Content]

Third, delete the first column Content, then recreate it as a multi-line text column

Fourth, create a third column, I'll call it Summary, and set the formula to =LEFT([ContentCalc],60)&"...", with 60 being any number of chars you want to truncate it to and it will be followed with "..." to indicate there is more text.

Finally, to get rid of the stuff, insert the following source into a Content Editor Web Part placed under the list hidden on the page:

<script type="text/javascript"> var theTDs = document.getElementsByTagName("TD"); var i=0; var TDContent = " "; while (i < theTDs.length) { try { TDContent = theTDs[i].innerText || theTDs[i].textContent; if (TDContent.indexOf("<div") == 0) { theTDs[i].innerHTML = TDContent; } } catch(err){} i=i+1; } </script>

Related Link