Tag Archives: sharepoint 2013 hosting

SharePoint 2013 Hosting – ASPHostPortal.com : Social Feature of SharePoint 2013

Social Feature of SharePoint 2013

Out-of-the-box SharePoint 2013 has some pretty neat capabilities to support project management initiatives in your organization. Some of the enhancements will greatly improve the communication on a project so that everybody can collaborate effectively!

ahp banner sharepoint-01

Some of the items like Newsfeeds enable immediate discussions, features connecting SharePoint to Microsoft Office helps people collaborate quicker and easier, and mobile improvements allow team members to stay tuned in while on the go.

SharePoint’s new features are strong influenced by–or in some cases, lifted from–from the top social networks. For instance, the updated My Sites feature has a strong microblogging component, complete with likes, hash tags, app mentions, and other social tools you’ll recognize from Facebook, Twitter, and Google+. Community sites–discussion forums where enterprise users share information and answer colleagues’ questions–bring a similar social feel to collaborative computing.

Sharepoint 2013′s People Card contains your contact information, as well as pictures, status updates, and activity feeds from SharePoint, Facebook, and LinkedIn. And SkyDrive Pro, the premium version of Microsoft’s cloud storage and syncing service, allows users to share files across SharePoint.

In earlier versions of SharePoint, each user had a profile and a personal site (e.g., My Site). The 2013 version of SharePoint splits My Site into three sections: Newsfeed, SkyDrive, and Sites. (More on each in the slideshow). A global navigation bar provides access to each section. These social features are tightly integrated into SharePoint 2013, so you no longer need to launch a Web browser to access them.

Previously, enterprise social networking on SharePoint required either extensive customization or the use of an add-on product such as NewsGator Social Sites. While still leaving room for third-party products to add features on top of the platform, Microsoft has now made SharePoint more of an enterprise social network in its own right.

Cheap and Recommended SharePoint 2013 Hosting

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

SharePoint 2013 Hosting – ASPHostPortal.com : How to Enable BreadCrumb in SharePoint 2013?

How to Enable BreadCrumb in SharePoint 2013?

You must be remember the BreadCrumb option situated next to the “Site Action” button in SharePoint 2010 is really handy to navigate up or down with a single click. You must have noticed in SharePoint 2013 this option is removed rather hidden in the master. Here I will show you how to get that option back in your master page and make your life simpler.

ahp banner sharepoint-01

The good news is Microsoft didn’t remove it from SharePoint 2013, it’s just hidden in the Seattle master page.

Step by Step

  • Open your site with SharePoint designer
  • Navigate to All Files -> _catalogs -> master page
  • Edit the Seattle.master in advanced mode and copy all the code
  • By default it’s not possible to edit the original master. To create a new one click on File -> Blank Mater Page
  • Check out the new master, edit it in advanced mode, delete all the existent code and paste the one from the original Seattle
  • Search for
<divclass="ms-breadcrumb-dropdownBox"style="display:none;">
  • Delete the CSS attribute
style="display:none;"
  • Two lines bellow change the visible attribute of the SharePoint:PopoutMenu to true
  • After editing your code it should look like this
<divclass="ms-breadcrumb-dropdownBox"><SharePoint:AjaxDeltaid="DeltaBreadcrumbDropdown"runat="server">
	<SharePoint:PopoutMenu
		Visible="true"
		runat="server"
		ID="GlobalBreadCrumbNavPopout"
		IconUrl="/_layouts/15/images/spcommon.png?rev=27"
		IconAlt="<%$Resources:wss,master_breadcrumbIconAlt%>"
		ThemeKey="v15breadcrumb"
		IconOffsetX="215"
		IconOffsetY="120"
		IconWidth="16"
		IconHeight="16"
		AnchorCss="ms-breadcrumb-anchor"
		AnchorOpenCss="ms-breadcrumb-anchor-open"
		MenuCss="ms-breadcrumb-menu ms-noList">
		<divclass="ms-breadcrumb-top">
			<asp:Label runat="server" CssClass="ms-breadcrumb-header" Text="<%$Resources:wss,master_breadcrumbHeader%>" />
		</div>
<asp:ContentPlaceHolderid="PlaceHolderTitleBreadcrumb"runat="server">
<SharePoint:ListSiteMapPathrunat="server"
SiteMapProviders="SPSiteMapProvider,SPContentMapProvider"
RenderCurrentNodeAsLink="false"
PathSeparator=""
CssClass="ms-breadcrumb"
NodeStyle-CssClass="ms-breadcrumbNode"
CurrentNodeStyle-CssClass="ms-breadcrumbCurrentNode"
RootNodeStyle-CssClass="ms-breadcrumbRootNode"
NodeImageOffsetX="217"
NodeImageOffsetY="210"
NodeImageWidth="16"
NodeImageHeight="16"
NodeImageUrl="/_layouts/15/images/spcommon.png?rev=27"
RTLNodeImageOffsetX="199"
RTLNodeImageOffsetY="210"
RTLNodeImageWidth="16"
RTLNodeImageHeight="16"
RTLNodeImageUrl="/_layouts/15/images/spcommon.png?rev=27"
HideInteriorRootNodes="true"
SkipLinkText=""/>
</asp:ContentPlaceHolder>
</SharePoint:PopoutMenu>
</SharePoint:AjaxDelta>
</div>
  • If you are using one of the themes from SharePoint your breadcrumb icon will not appear as it should, to get it back add the script below before the closing tag
<scripttype="text/javascript">
document.getElementById("GlobalBreadCrumbNavPopout-anchor").innerHTML='<img alt="Navigate Up" src="/_layouts/15/images/spcommon.png?rev=27">';</script>
  • Save the modified master page, check it in and publish the major version
  • Open your SharePoint Site, go to Settings -> Site Settings -> MasterPage under Look and Feel and select the new master page for the Site master and System master options
  • You will see a new icon on the left side of the menu.

Cheap and Recommended SharePoint 2013 Hosting

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

SharePoint 2013 Hosting – ASPHostPortal.com :: SharePoint 2013 Management Tips

SharePoint 2013 boasts a more simplified user interface than its predecessors, but several new features make it not only a powerful tool for collaboration, but for data analysis and integration as well. Although most of these features are built-in or enabled by default, some may not be obvious at first glance or will require a few steps of configuration to avoid user confusion.

ahp banner sharepoint-01

From improved site creation to increased social media capabilities, these expert tips will help administrators and enterprises get the most out of what SharePoint 2013 has to offer.

The right way to configure co-authoring in SharePoint 2013

With document co-authoring enabled by default in SharePoint 2013, multiple users can edit a document at a time without overwriting previous changes. Administrators will still need to configure SharePoint so users aren’t required to check documents out of the document library, and document versioning — which is disabled by default — will also need to be configured appropriately.

SharePoint 2013′s tight social media integration

Unlike previous versions of SharePoint, which had limited social media capabilities, SharePoint 2013 integrates microblogging features found on Twitter and Facebook, including hashtags, follows, mentions and likes. Enterprises can leverage the increased connectivity of the SharePoint community as a way to share knowledge and improve team productivity.

How to synchronize SharePoint 2013 lists with Outlook 2013

Support for various types of SharePoint 2013 lists is built into Outlook 2013, allowing users to access their SharePoint data directly from the email client. However, administrators would do well to train users on accessing SharePoint data through Outlook in order to avoid any accidental crossover between personal and team information.

How the Design Manager in SharePoint 2013 modernizes site creation

Site creation is much more flexible in SharePoint 2013, thanks to the Design Manager. This new publishing feature not only allows users to upload designs created in the HTML or CSS design tools of their choice, but also features improved themes, design packages and device channels that render sites differently for mobile devices.

How SharePoint 2013 analytics enables real-time decision making

Accessing analytics is easier than ever in SharePoint 2013. OData support in Business Connectivity Services provides real-time access to data from multiple sources, and various Web protocols are available for query and update operations. Another improvement over past iterations of SharePoint is the fact that reports can now be generated in Excel.
How to synchronize SharePoint 2013 lists with Outlook 2013

Support for various types of SharePoint 2013 lists is built into Outlook 2013, allowing users to access their SharePoint data directly from the email client. However, administrators would do well to train users on accessing SharePoint data through Outlook in order to avoid any accidental crossover between personal and team information.

Cheap and Recommended SharePoint 2013 Hosting

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

SharePoint 2013 Hosting – ASPHostPortal.com :: Data Loss Prevention in SharePoint 2013

Data Loss Prevention in SharePoint 2013

A problem that has plagued many organizations over the years is how to best protect sensitive data in their SharePoint environments. This includes things like credit card, drivers license, and social security numbers. For SharePoint on premise deployments this has required third party applications to be used to provide this functionality to all locations in the SharePoint farm.

SharePoint 2013 Hosting - ASPHostPortal.com :: Data Loss Prevention in SharePoint 2013

Data Loss Prevention (DLP) is a feature that was first introduced in Exchange (2013 and Online) and is now in SharePoint Online (but not the on-premises version). I covered the initial news on this topic last year and took the chance at the Microsoft Ignite conference to find out had the functionality predicted then been realized in production.

DLP is actually a great example of how engineering teams are now working across multiple products rather than in the narrow silos of the past and it’s obvious that a lot of lessons learned from the DLP implementation in Exchange have influenced the implementation in SharePoint Online to provide protection against the misuse of sensitive data in documents. The documents can be stored in SharePoint or OneDrive for Business libraries.

Compliance officers, paralegals, or others performing a legal audit often need to assess the degree of risk posed by sensitive and personal data stored on SharePoint sites. Data loss prevention (DLP) in SharePoint Online provides you with a way to identify that data, so you can work with document owners to reduce any risk to your organization.

Assign permissions to the eDiscovery Center

Permissions are a big deal. And to run a query in the eDiscovery Center, you need lots of different types of permissions. Assigning permissions to multiple people for Exchange Online, SharePoint Online, the eDiscovery Center, and each site collection could take a long time.

If you only want to use the eDiscovery Center, you might wonder why you need all those other permissions. The eDiscovery Center is a site collection, and like any other site collection, you have to be given permissions to access it. Access to the eDiscovery Center, however, grants no special, automatic access to other site collections, to documents, or to content. To gain access to data stored on other site collections and in OneDrive, you’ll need to be granted admin permissions for each. Multiply that action times the number of admins in your organization, and you can see how it makes sense to optimize the process. Because the security group that you’ll create in the next set of tasks is powerful, choose its members carefully.

Open the eDiscovery Center

  • Sign in to the Office 365 admin portal.
  • In the Admin menu, choose SharePoint.
  • Click the link to the eDiscovery Center on the site collections link page. Your eDiscovery Center URL will look similar to this: http://contoso.sharepoint.com/sites/ediscovery.

Create an eDiscovery case

  • Cases are where you can run queries and export them for analysis. Follow these steps to create a case.
  • In the eDiscovery Center, click Create new case.
  • Type a <title and description> for your case.
  • In the Web Site Address box, type the last part of the URL you want for the case. Each case gets its own URL, so feel free to make this as unique and helpful as you’d like.
  • Under Select a template, select eDiscovery Case.
  • Under User Permissions, select whether to keep the same permissions as the parent site or use unique permissions. If specific people need access to this case but not to others, choose
  • Use unique permissions.
  • You can optionally choose to display the site on the Quick Launch or in the top link bar on the eDiscovery Center.
  • Click Create.

Query for sensitive data within a SharePoint site

Go to your case menu by using the URL you created. The case menu is specific to the case you’re working on and won’t show other cases that are in the eDiscovery Center. (When querying for sensitive data, you only need to pay attention to two sections on this page– Queries eDiscovery Sets.) Querying takes two steps: creating a query and running a query.

View and export the results of a query

You’ve made it. Now you can actually see the results of the query you’ve been building this whole time.

  • Click Search to see the results on the bottom of the page.
  • Click the Export button to view the data in a spreadsheet. For more information about exporting your data, see Export eDiscovery content and create reports.
  • Click Save if you want to keep the query.

Cheap and Recommended SharePoint 2013 Hosting

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

Sharepoint 2013 Hosting – ASPHostPortal.com :: User Profile Property Cannot be Deleted in SharePoint 2013

If you run into the problem that you can’t delete properties within the User Profile Service Application, an Exception like this will be shown:

User Profile Property Cannot be Deleted in SharePoint 2013

The delete operation failed, please try again later. If the problem persists, please contact your administrator.

To resolve the problem, grant “Full Control” permissions to the administrative Applicationpools group (WSS_WPG).

User Profile Property Cannot be Deleted in SharePoint 2013 2

Now you should be able to delete properties again.

Cheap and Recommended SharePoint 2013 Hosting

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

SharePoint 2013 Hosting – ASPHostPortal.com :: Cannot find an SPWeb object with Id or URL

You’ve logged into a farm server with the SharePoint Setup User Administrator account.  You’ve opened a SharePoint management shell with elevated privileges.  You are attempting to import a document library using the SPWeb object but experience this error:

ahp banner sharepoint-01

    Import-SPWeb : Cannot find an SPWeb object with Id or URL : <URL>…

This can occur when the account you are logged in as has not been added to the SharePoint_Shell_Access role of the content and/or farm configuration databases.  Generally, you want your administrator account to be added to this role for all farm content databases and the farm configuration databases so that you can manage them from a PowerShell.

In the following procedure, you will first get the GUIDs associated with the content databases.  Then, you will check each content database and the farm configuration database for the accounts that have had the SharePoint_Shell_Access role added to them.  Lastly, you will add the role to the desired account for each database.

Solutions

  1. Note down the following information:
    1. The account you used trying to perform the import that resulted in the error (call it User.Account)
    2. The name of the content database containing the site into which you wanted to perform the import (call Content_A).
  2. Login to a SharePoint farm server using the SharePoint Setup User Administrator account.
  3. Launch an elevated instance of the SharePoint 2013 Management Shell.
  4. Execute Get-SPContentDatabase.  This returns a list of all farm content databases, along with summary information and including the database GUID.
  5. Note down the content databases and their GUIDs.
  6. Execute Get-SPShellAdmin <GUID> for each GUID noted in step 5).  This will return a list of all user accounts added to the SharePoint_Shell_Access role for that database.
  7. Note down where the account in step 1) above is missing from the role.
  8. Execute: Get-SPShellAdmin.  This will return a list of all user accounts added to the SharePoint_Shell_Access role for the farm configuration database.
  9. Execute: Add-SPShellAdmin -UserName DOMAIN\User.Account <GUID> for each content database identified in step 5). Executing this command adds this role for both the content database and for the farm configuration database.

    If you experience an error trying to add this role to that account, perform the steps in this reference.

  10. Repeat step 6) – 8) to verify that the SharePoint_Shell_Access role has now been added to the desired account.

Best SharePoint 2013 Hosting Recommendation

Following reviewed for Best ASP.NET hosting companies that help with SharePoint 2013, ASPHostPortal is Best ASP.NET Hosting Recommendation for SharePoint 2013. They give 99,99% uptime assured, as well as 30 Days Money back assured, superb customer service, and many more.

SharePoint 2013 Hosting – ASPHostPortal.com :: The Given Key Was Not Present in the Dictionary

You are attempting to register a new managed account to your SharePoint Server 2013 farm.  After entering the account details, and then clicking OK, you see the error, The given key was not present in the dictionary.

ahp banner sharepoint-01 Continue reading

SharePoint 2013 Hosting with ASPHostPortal.com :: How to Access SharePoint Data from Provider-Hosted Apps Use the Right Context

Recently I have focused on building apps that access, manipulate, and interact with data stored in SharePoint Online with Office 365. If you have done any development using the client-side object model (CSOM) for SharePoint, you understand the importance of instantiating the proper ClientContext object to access data in a particular SharePoint site. The ClientContext constructor takes as an argument the URL of a SharePoint site and allows you to access data stored in the Lists collection of the Web associated with it. In this post, I will discuss the various context objects you should use in your provider-hosted app depending on where the data your app needs to access resides and if the user’s permissions need to be considered. If you have been developing apps for SharePoint for awhile now (and even if you haven’t), I strongly encourage you to use Visual Studio 2013 and the Office Developer Tools for Visual Studio 2013

Host webs and app webs

When dealing with apps for SharePoint, you will become familiar with host webs and app webs:

  • Host web – the SharePoint site to which an app is installed
  • App web – the special isolated site (a unique app web is provisioned for each installation of the app) where the app for SharePoint’s internal components and content, such as lists, content types, workflows, and pages, are deployed

Note that a provider-hosted app is not required to have an app web, and in fact may not need one depending on your business requirements.

Your app will always have Full Control permissions to its app web. However, your app will need to request (and be granted) permissions by the user installing your app in order to access data in the host web. This is handled through the app manifest.
If your app needs to access data in the SharePoint site where it is being installed, you will be working with a host web context of some sort. As you will see, there are actually two different host web context objects, depending on the app authorization policy you choose.
Life made easy, thanks to SharePointContext.cs

When you create a new provider-hosted app in Visual Studio 2013, you have the option to create a new ASP.NET Web Forms or MVC application to serve as your app’s remote web application. If you are using the Office Developer Tools for Visual Studio 2013, you also have the option to convert an existing ASP.NET web application to an app for SharePoint project (really cool!) In either case, you will notice that SharePointContext.cs is added to the remote web application project. This file contains class definitions forSharePointAcsContext and SharePointHighTrustContext, which allow you to create host web and app web context objects based on whether your trust broker is ACS (which it is with Office 365) .
Accessing data in the app web
To access data in the SharePoint app web from your app, use the following pattern:

CSOM (C#)

var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);using (var clientContext = spContext.CreateUserClientContextForSPAppWeb()){Web web = clientContext.Web;

clientContext.Load(web);

clientContext.ExecuteQuery();

ListCollection lists = web.Lists;

clientContext.Load<ListCollection>(lists);

clientContext.ExecuteQuery();

}

REST (C#)

var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);HttpWebRequest listRequest = (HttpWebRequest)HttpWebRequest.Create(spContext.SPAppWebUrl + “/_api/web/lists”);listRequest.Method = “GET”;listRequest.Accept = “application/atom+xml”;

listRequest.ContentType = “application/atom+xml;type=entry”;

listRequest.Headers.Add(“Authorization”, “Bearer ” + spContext.UserAccessTokenForSPAppWeb);

JSOM

var appweburl = decodeURIComponent(getQueryStringParameter(“SPAppWebUrl”));var clientContext = new SP.ClientContext(appweburl);var appWeb = clientContext.get_web();var appWebListColl = appWeb.get_lists();

clientContext.load(appWebListColl);

clientContext.executeQueryAsync(onAppWebGetListSuccess, onError);

Accessing data in the host web

To access data in the SharePoint host web (the SharePoint site where your app is installed) from your app, use the following pattern:

CSOM (C#)

var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);using (var clientContext = spContext.CreateUserClientContextForSPHost()){Web web = clientContext.Web;

clientContext.Load(web);

clientContext.ExecuteQuery();

ListCollection lists = web.Lists;

clientContext.Load<ListCollection>(lists);

clientContext.ExecuteQuery();

}

REST (C#)

var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);HttpWebRequest listRequest = (HttpWebRequest)HttpWebRequest.Create(spContext.SPAppWebUrl + “/_api/web/lists”);listRequest.Method = “GET”;listRequest.Accept = “application/atom+xml”;

listRequest.ContentType = “application/atom+xml;type=entry”;

listRequest.Headers.Add(“Authorization”, “Bearer ” + spContext.UserAccessTokenForSPHost);

JSOM

var appweburl = decodeURIComponent(getQueryStringParameter(“SPAppWebUrl”));var hostweburl = decodeURIComponent(getQueryStringParameter(“SPHostUrl”));var clientContext = new SP.ClientContext(appweburl);var factory = new SP.ProxyWebRequestExecutorFactory(appweburl);

clientContext.set_webRequestExecutorFactory(factory);

var appContextSite = new SP.AppContextSite(clientContext, hostweburl);

var hostWeb = appContextSite.get_web();

hostWebListColl = hostWeb.get_lists();

clientContext.load(hostWebListColl);

clientContext.executeQueryAsync(onHostWebGetListSuccess, onJSOMError);

Note that using JSOM, we still need to construct a ClientContext for the app web before we generate an AppContextSite for the host web, made possible through theSP.ProxyWebRequestExecutorFactory.

A note about the app-only authorization policy

By default, authorization checks in the host web succeed only if both the current user and the app have sufficient permissions to perform the action in question, such as reading from or writing to a list. We are reminded that the user’s permissions are taken into account based on the names of the context and access token objects we use in these scenarios: for instance, CreateUserClientContextForSPHost and UserAccessTokenForSPHost. However, your app has the ability to do something akin to running with elevated privileges using the app-only policyfor authorization. Also controlled through the app manifest, the app-only policy is useful when an app doesn’t need or want to consider the permissions of the current user. In Visual Studio 2013, you can specify that your app would like to have the ability to use the app-only policy by checking this box in the AppManifest.xml editor.
That being said, just because your app is granted this permission does not mean that you can use the same host web context or access token as before to automatically leverage it. To access data from the SharePoint host web (taking only your app’s permissions into account and ignoring the current user’s permissions) from your app, use the following pattern:

CSOM (C#)

var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);using (var clientContext = spContext.CreateAppOnlyClientContextForSPHost()){Web web = clientContext.Web;

clientContext.Load(web);

clientContext.ExecuteQuery();

ListCollection lists = web.Lists;

clientContext.Load<ListCollection>(lists);

clientContext.ExecuteQuery();

}

REST (C#)

var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);HttpWebRequest listRequest = (HttpWebRequest)HttpWebRequest.Create(spContext.SPAppWebUrl + “/_api/web/lists”);listRequest.Method = “GET”;listRequest.Accept = “application/atom+xml”;

listRequest.ContentType = “application/atom+xml;type=entry”;

listRequest.Headers.Add(“Authorization”, “Bearer ” + spContext.AppOnlyAccessTokenForSPHost);

Remember that in order to use the app-only policy, your app must request and be granted this permission by the site owner who installs your app. Also note that there is no JSOM example using the app-only policy because apps that do not make OAuth authenticated calls (such as apps that are only JavaScript running in the app web) cannot use the app-only policy.
As you can see, the code you write in each of the above scenarios (accessing data in the app web, host web, or using the app-only authorization policy) is identical except for the method or property you use from the SharePointContext class to get the appropriate context or access token. Understanding these subtle differences is vitally important when making sure your app has the ability to access and manipulate the SharePoint data it needs.

SharePoint 2013 Hosting – ASPHostPortal.com :: Event ID 6398 AppFabric Distributed Cache Error

Sharepoint 2013 Event ID 6398 AppFabric Distributed Cache Error

ahp_freehostSHPBefore, I started seeing repeated errors with Event ID 6398 and description of:

The Execute method of job definition Microsoft.Office.Server.UserProfiles.LMTRepopulationJob (ID 581fc80e-f7fb-4b3b-99cd-7affa208f57b) threw an exception. More information is included below. Unexpected exception in FeedCacheService.BulkLMTUpdate: Unable to create a DataCache. SPDistributedCache is probably down

This error occurs every 5 minutes as the User Profile Service – Feed Cache Repopulation Job ran and it also prevented anything from populating the My Sites Newsfeeds section. The Newsfeeds page would only return “We’re still collection the latest news. You may see more if you try again a little later.” I tried to follow a multitude of blog posts, forum posts and articles on repairing the AppFabric Distributed Cache Service and was unable to correct the error.

My next step was to try to get the AppFabric service back to the initial setup.

  • Remove the AppFabric setup from Add/Remove Programs.
  • More information on this process in this MSDN article and also follow the link from there to Clean up any remaining AppFabric settings either manually or using the Cleanup Tool they provide.
  • After rebooting, I downloaded the AppFabric 1.1 Installer from here.

However, do not install it manually, instead use the SharePoint 2013 setup disc to use the prerequisite installer to install and configure AppFabric using the following command:

prerequisiteinstaller.exe /appFabric:C:\pathto\WindowsServerAppFabricSetup_x64.exe

Now you can continue on with the initial configuration of the AppFabric service. I ran the following command from the SharePoint 2013 PowerShell as Administrator

$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"

$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}

$serviceInstance.Provision()
  • Then run

Add-SPDistributedCacheServiceInstance

You should see the Distributed Cache service running in Manage Services on Server in Central Administration and also see the AppFabric Caching Service running in Services. If you don’t then try Remove-DistributedCacheServiceInstance and Add again. After completing this process, I was able to go back to MySites and see the Newsfeed as it should be and also no more errors in the Event Log.

NewsFeed Working

I would love to know why this occurred since I was not working on anything with the Caching service prior to the errors; however, I hope this helps someone else caught up in this problem.

SharePoint 2013 Hosting – ASPHostPortal.com :: Integrating WordPress Website Into SharePoint 2013

Within this blog post, I’ll go over about how we will easily combine a WordPress blog with your SharePoint site with all the help of SharePoint 2013 work flow.

ahp_freehostSHP
Using SharePoint 2013 REST API and creating SPD based simple Workflow, we are going to fetch most recent 2 or more submit in the blog site and add those within a SharePoint checklist. Continue reading