SharePoint

SharePoint 2013 Excel Service 401 Error

Posted on Updated on

Recently when I’m working with SharePoint Excel services i received below error message.

“Before Opening Book ObjectSystem.Net.SystemNetworkCredentialSystem.Net.WebException: The request failed with HTTP status 401: Unauthorized. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at ExcelService.OpenWorkbook(String workbookPath, String uiCultureName, String dataCultureName, Status[]& status)”

to get rid of this error you have to disable “Loopback Check” from front end servers and app servers. you can follow these steps to disable Loopback Check.

Method 1: Specify host names (Preferred method if NTLM authentication is desired)

  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
  3. Right-click MSV1_0, point to New, and then click Multi-String Value.
  4. Type BackConnectionHostNames, and then press ENTER.
  5. Right-click BackConnectionHostNames, and then click Modify.
  6. In the Value data box, type the host name or the host names for the sites, and then click OK.
  7. Quit Registry Editor, and then restart the IISAdmin service.

Method 2: Disable the loopback check (less-recommended method)

  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Quit Registry Editor, and then restart your computer.

 

Happy Coding Smile

Anonymous Users get Credentials Prompt For Default “osssearchresults.aspx” Search Page on SharePoint Publishing Site

Posted on Updated on

Recently i came across a weird kind of issues..i have SharePoint 2013 farm with Several host header site collection.those site collections are enable to the public also, therefore all anonymous users can view those site collections.Except one site collection anonymous user can access “osssearchresults.aspx” default search page.all site collections are in the same web application.to verify the problem i created a separate web part page and inserted “Search Box” web part and “Search Result” Web part.still the same problem new page also prompting the user credentials for anonymous users.then i used fiddler to identify what are the pages that are prompting permission.actually it’s not pages. there are some “JS” files that required user credentials. reason is those files are not published properly.so what i did was i “checked in” all those “JS” files by publishing major version of those files.

*Note :- “Control_SearchBox.js and Control_SearchResult.js” are the two main files related to “osssearchresults.aspx” page..therefore make sure you publish/”check in” the major version of those two files.

below you can find two directories.you need to “check in”  all unpublished “JS” files in these two directories.using SharePoint designer navigate to these directories and publish/”check in” new version of it’s “JS” files.SharePoint use these “JS” files in “Search Box” and “Search Result” Web Parts.if these files are not publish/”check in” properly that means anonymous users cannot access these files.that’s why “Search Box” and “Search Result” web parts are prompting for credentials.

 

“Catelogs/masterpages/display template/search”

SearchBox

“Catelogs/masterpages/display template/finters “

SearchBox

if the problem still exist use “Fiddler” to identify remaining files which are still prompting for credentials .you can download Fiddler using this link.  Hope This is help to you.. 🙂

Brunei Cloud Users Group Monthly Gathering – October 2016

Posted on Updated on

I’m really happy to announce that I will be speaking at the Brunei Cloud Users Group in Brunei, October 29 2016.

More Information
http://www.sharepointbrunei.net/
praneeth@sptricks.com 

October_Session_2016

Brunei Cloud Users Group Monthly Gathering – October 2015

Posted on Updated on

I’m really happy to announce that i will be speaking at the Brunei Cloud Users Group in Brunei, October 31 2015. http://www.sharepointbrunei.net/

BCUGNewOCT2015

SharePoint Brunei User Group Monthly Gathering – March 2015

Posted on

I’m really happy to announce that i will be speaking at the SharePoint Brunei User Group in Brunei, March 31 2015. http://www.sharepointbrunei.net/

SPBUG_Mar2015

SharePoint Brunei User Group Monthly Gathering – October 2014

Posted on Updated on

I’m really happy to announce that i will be speaking at the SharePoint Brunei User Group in Brunei, October 30 2014. http://www.sharepointbrunei.net/

SPB2014OCT

Hide SharePoint “RibbonRow” and “SuiteBar” From Anonymous Users

Posted on Updated on

For public facing SharePoint sites most of the time peoples don’t want to show SharePoint “Suitebar” and “RibbonRow” for Antonymous Users

1

So here how you can hide SharePoint 2013 “suiteBar” for anonymous users.

  1. Open the master page (default Master and the Home Page Master) using SharePoint Designer. Before edit your master page take a backup copy Smile

image 

2. Select your master page -> right click –>Click on  “check out”

image

image

3. Select the master page again -> right click –> Click on “edit file in advanced mode”

image

4. Find the <div id=”suiteBar” class=”ms-dialogHidden noindex”> code block

image

5. Now change <div id=”suiteBar” class=”ms-dialogHidden noindex”>  to <div id=”suiteBar” class=”ms-dialogHidden noindex” style=”display:none”>

image 

 

This will hide the “suitbar” for all users including login users.but we need to enable suite bar for login users.to do that insert below script block right after the above </div> tag

6.Right click on <div id=”suiteBar” class=”ms-dialogHidden noindex”>  to <div id=”suiteBar” class=”ms-dialogHidden noindex” style=”display:none”> code block and click on “Select Tag”

image 

Suitebar_New

7. insert below script block right after the selected section

<!– My Custom Code –>

<SharePoint:SPSecurityTrimmedControl ID=”HideSuiteBar” runat=”server” PermissionsString=”ManageWeb”>

<script type=”text/jscript”>

document.getElementById(“suiteBar”).style.display = “block”;

</script>

</SharePoint:SPSecurityTrimmedControl>

<!– –>

Hide_SuiteBar_New

 

This will hide SharePoint “SuiteBar” for Anonymous users.

SNAGHTML2c8c40e4

Now we have to hide SharePoint “Ribbon Row”

8.Go to your master page. find  <div id=”s4-ribbonrow” style=”height: 35px; display: inherit !important;”> code block.

image

9. Change <div id=”s4-ribbonrow”> to <div id=”s4-ribbonrow” style=” display:none”>

image

10. Right click on <div id=”s4-ribbonrow” style=” display:none”> code block -> click on “Select Tag”

image 

image

11. Insert below script block right after the above selected </div> tag. (at the end of the Selected Tag)

<!– My Custom Code –>

<SharePoint:SPSecurityTrimmedControl ID=”HideRibbonRow” runat=”server” PermissionsString=”ManageWeb”>

<script type=”text/javascript”>

document.getElementById(“s4-ribbonrow”).style.display = “block”;

</script>

</SharePoint:SPSecurityTrimmedControl>

<!– –>

Hide_S4_Ribbon_New

 

12. After Insert above code block .your page will look like below screenshot.

S4_Ribbon_New

 

13. “Save” your changes and “Check In” the “Master Page”.

14. This is the final output / View for “anonymous” users.

SNAGHTML3e1597c

Note :

You have to “DeactivateMinimal Download Strategy” feature from “Manage Site Features” to take effect all these changes.

Site_Features

Minimal Download Strategy

You can use below url to login to you site.because now you can’t see “Sign in” Link on your pages. 🙂

http://SiteUrl/_windows/default.aspx

Happy Coding  Smile

SharePoint Brunei User Group

Posted on

I’m really happy to announce that i will be speaking at the SharePoint Brunei User Group in Brunei, September 20 2014. http://www.sharepointbrunei.net/

SPB14_New

SharePoint Brunei User Group

Posted on Updated on

I’m really happy to announce that i will be speaking at the SharePoint Brunei User Group in Brunei, August 13 2014. http://www.sharepointbrunei.net/ 

SPB1

Change SharePoint List “Display Item Form” Close Button Default Redirect Location

Posted on Updated on

    Most of the times peoples are using display item form to display their list content in a page.By default SharePoint “display item form” Close button redirect you to the default view of the library where your page/document exists or default view of the list where your item exists. Some scenarios we want to change this redirect url. you can use several ways to achieve this. For an example you can use a JavaScript  to achieve the same thing. In my case I’ll show you using a page parameter how we can change the Redirect page of a SharePoint “display item form” close button.In my example I have a list called “News” and I’m going to show the latest news in a different SharePoint page called “News” which is inside the “Site Pages” library.Currently this is my News list default Display Item form Url “http://spfoundation/_layouts/15/start.aspx#/Lists/News/DispForm.aspx?ID=1&Source=http%3A%2F%2Fspfoundation%2FLists%2FNews%2FAllItems%2Easpx” .This means after you click on Close button you will automatically redirect to “News” list default “AllItems.aspx” page.

    1

    So my goal is to change the “&Source” Parameter.

  • Create a new Page.( In my example I created a “Wiki” Page inside my “Site Pages” library.I inserted a header Called “Latest News“)

    2

  • Open the page using “SharePoint Designer

3

  • Insert a new Display Item form

4_1

  • Select your Display Item Form and click “Add/Remove Columns” button in the ribbon.this will brings the “Edit Column” window

6

6

  • Remove unnecessary columns.in my example I used “Title” and “ContentColumn

7

  • Sort using “Id” to show latest Contents (this is not mandatory.You can skip this step)

8

9

  • Find “<xsl:template name=”dvt_1.rowview”>” tag

10

  • Change the table data (<td>) content like below .

11

  • Select the Display Item Form and click on Parameter button.this will open the Data View Parameter Window

12

  • Create a new Parameter called “Source” and for the “Default Value” give your redirect page url.in my example im redirect to my home page and click ok ..

13

  • Add our new parameter at the end of your column url.in my example it’s “Title” column url.

 17

 

  • Save and Close Your Page. That’s it Smile this is how my page looks like

15

  • This is my new Display item Form Url “http://spfoundation/Lists/News/DispForm.aspx?ID=1&Source=http://spfoundation” previously it like this

    “http://spfoundation/_layouts/15/start.aspx#/Lists/News/DispForm.aspx?ID=1&Source=http%3A%2F%2Fspfoundation%2FLists%2FNews%2FAllItems%2Easpx”

16

Happy Coding Smile