Thursday, August 27, 2015

SHAREPOINT PROPERTY BAGS

Property bag is a feature available in Windows SharePoint Services 3.0. Its nothing but a hash table of Key-Value pairs. It allows to add properties to objects in a SharePoint site.

image
SharePoint Property Bag allows to store configurations settings at different levels of the SharePoint hierarchy outside of the application itself. Property bag is basically a hash table of key-value pair options. Property bag feature is available in Windows SharePoint services 3.0, SharePoint 2010 and SharePoint 2013. Property bag helps you to store meta data as key-value pairs example Connection Strings, file paths, server names and other settings in SharePoint application. This is something like app.config information in classic ASP.NET. Property bags can be created / Modified / Deleted from Sharepoint designer, using Object model or using http://pbs2010.codeplex.com/ access Property bags from Central Administration.
Advantages of using Property bag element
1. The SharePoint Property Bag Settings includes a hierarchical configuration manager that can safely store and retrieve configuration settings at the following levels:
*Farm (SPFarm class)
*Web application (SPWebApplication class)
*Site collection (SPSite class)
*Site (SPWeb class)
*List (SPList class)
2. Import and Export Property bags
3. Access Property bags from Central Administration or Site Settings
4. Encrypting property bag value
Using SharePoint designer :
You can use SharePoint designer for getting the Property bag settings.
1. Open a site in SharePoint Designer
2. Go to Site menu click on Site options
3. Site Settings dialog box opens
4. Click on Parameters tab where you can see the list of existing properties
from the same place you can even perform add/modify/delete operations.
Using Central Admin :
There is no out of the box user interface available for setting and reading the property bag values, however you can download this Property Bag util from  http://pbs2010.codeplex.com/releases/view/46201 to have the interface in central admin for setting the property bag values. This SharePoint Property Bag Settings is a reusable component that you can include in your own SharePoint applications. It can store simple types, such as integers or strings, as well as any type that can be serialized to XML.
Using SharePoint object model :
using (SPSite RootSite = new SPSite(URL))
            {
                using (SPWeb web= RootSite.OpenWeb())
                {                   
                    try
                    {
                        web.AllowUnsafeUpdates = true;
                       // Get Property bag
                        if (web.AllProperties.ContainsKey("SiteID"))
                        {
                            var data = web.AllProperties["SiteID"].ToString();
                        }                       
                        // Set Property bag
                        web.Properties["SiteID"] = "GUID";
                        web.Properties.Update();
                        web.AllowUnsafeUpdates = false;                       
                    }
                    catch (Exception ex)
                    {
                      //Throw Exception 
                    }          
                }
            }


Why to Use SharePoint Property Bag

The Property Bag hash table for a site can store any metadata as Key-Value pairs such as connection strings, server names, file paths, and other settings needed by your SharePoint application. Most of the time we will store the above settings in configuration file, which is common to the entire web application. If there is any setting specific each and individual sites in the web application, then we have maintain that many entries in the config file. To over come the above scenario we can use the SharePoint Property Bag.
There is no specific out of box user interface available to set or to read the property bag settings. In WSS 3.0 property bag values has to set/get using the object model. There is an option available in SharePoint designer to set/get the property bag settings. Go to Site -> Site Settings. click on the Parameters tab.  On this tab, you will be able to manipulate of all of your custom property bag values.
image
image
How to Use
SPSecurity.RunWithElevatedPrivileges(delegate()
        {
        try
        {
            using (SPSite RootSite = new SPSite(URL))
            {
                using (SPWeb SiteCollection = RootSite.OpenWeb())
                {                    
                    try
                    {
                        SiteCollection.AllowUnsafeUpdates = true;
                       // Get connection string from Property bag
                        if (SiteCollection.AllProperties.ContainsKey("ConnectionString"))
                        {
                            ConnectionString = SiteCollection.AllProperties["ConnectionString"].ToString();
                        }                        
                        // Set siteID in the Property bag
                        SiteCollection.Properties["siteID"] = siteID;
                        SiteCollection.Properties.Update();
                        SiteCollection.AllowUnsafeUpdates = false;                        
                    }
                    catch (Exception ex) 
                    { 
                      //Handle Exception  
                    }           
                }
            }
        }
        catch(Exception ex)        
        {            
        }
        });
Examples


The following example is a console application that accesses the Properties property, iterates through the collection, and prints each key/value pair to the console.
using System;
using System.Collections;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            using (SPSite site = new SPSite("http://localhost"))
            {
                using (SPWeb web = site.OpenWeb())
                {
                    SPPropertyBag props = web.Properties;
                    foreach (DictionaryEntry de in props)
                    {
                        Console.WriteLine("Key = {0}, Value = {1}", de.Key, de.Value);
                    }
                }
            }
            Console.ReadLine();
        }
    }
}
The output that this application prints to the console varies with the website, but it might look like the following:
Key = vti_associatemembergroup, Value = 5
Key = vti_extenderversion, Value = 14.0.0.4016
Key = vti_associatevisitorgroup, Value = 4
Key = vti_associategroups, Value = 5;4;3
Key = vti_createdassociategroups, Value = 3;4;5
Key = vti_siteusagetotalbandwidth, Value = 547
Key = vti_siteusagetotalvisits, Value = 9
Key = vti_associateownergroup, Value = 3
Key = vti_defaultlanguage, Value = en-us

Wednesday, August 26, 2015

Guided Walkthrough: Outlook Connectivity

The goal of this guided walkthrough is to enable you to isolate and resolve any connectivity or performance issues that you are experiencing when you connect your Microsoft Outlook client to an Office 365 mailbox. This guided walkthrough is intended for Office 365 tenant administrators to help diagnose Outlook connectivity issues for their users.
For more information, visit the following Microsoft website:

Guided Walkthrough: Sending email from another person's mailbox or from a group in Office 365

AThe Sending email from another person's mailbox guided walkthrough shows you how to send email as another user or how to send email as a group.
For more information, visit the following Microsoft website:

Guided Walkthrough: Sharing calendar and contacts in Office 365

The sharing calendar and contacts guided walkthrough shows you how to set up a shared calendar or contacts with an entire organization or large group or users. You can also share your calendar or contacts with specific users.
For more information, visit the following Microsoft website:

Guided Walkthrough: Set Up Skype for Business External Communications

The goal of this guided walkthrough is to let your Skype for Business users IM and talk with Skype for Business contacts in other organizations, and also to Skype users who are signed in with a Microsoft account (formerly Windows Live ID)..
For more information, visit the following Microsoft website:

IdFix DirSync Error Remediation Tool

IdFix is used to perform discovery and remediation of identity objects and their attributes in an on-premises Active Directory environment in preparation for migration to Office 365. IdFix is intended for the Active Directory administrators responsible for DirSync with the Office 365 service.
For more information, visit the following Microsoft website:

Windows Azure Active Directory Module for Windows PowerShell

Windows Azure Active Directory Module for Windows PowerShell is a set of Windows PowerShell cmdlets that Office 365 administrators can use to create, to edit, and to remove Office 365 users, domains, and groups. It also includes the cmdlets that are required to configure identity federation for an Office 365 domain. It uses Role Based Access Control (RBAC) to control which actions can be performed by users. Tenant administrators, support engineers, and partners can use it to access tenants. Its functionality is intended as a command-line version of the Office 365 portal. It is available in 32-bit and 64-bit versions. Windows Azure Active Directory Module for Windows PowerShell is targeted to Office 365 for enterprises customers, but all Office 365 administrators have access to it.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the Windows Azure Active Directory Module for Windows PowerShell tool:
ArticleInternet browser can't display the AD FS webpage when a federated user tries to sign in to Office 365 web resources
When a federated user tries to sign in to the Office 365 portal, Internet Explorer cannot display the Office 365 portal webpage.
ArticleYou can't manage or remove objects that were synced from the on-premises Active Directory Domain Services to Windows Azure AD
This article shows you how to troubleshoot the issue of not being able to remove an orphaned user account that was synchronized to Office 365 from your on-premises Active Directory Domain Services (AD DS) by using the Office 365 portal or by using Windows PowerShell.
ArticleYou can't open the Windows Azure Active Directory Module for Windows PowerShell
When you try to open the Windows Azure Active Directory Module for Windows PowerShell, the Windows PowerShell console window opens with many text errors indicating that module packages couldn't be loaded.

Snooper

Snooper.exe is a Microsoft Lync Server 2010 protocol analysis tool that you can use to view and to analyze Session Initiation Protocol (SIP) and Conferencing Control Channel Protocol (CCCP) logs for the client and server. Snooper is included in the Lync Server 2010 Resource Kit Tools.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the Snooper tool:
ArticleSnooper Tool
This article provides additional information about Snooper.
ArticleSkype for Business Client Logging
This article describes how to use Snooper to troubleshoot issues with Skype for Business.

SharePoint Designer 2013

SharePoint Designer 2013 is the tool of choice for the rapid development of SharePoint applications. Using SharePoint Designer, advanced users and developers alike can rapidly create SharePoint solutions in response to business needs. Advanced users can compose no-code solutions that encompass a variety of common scenarios, from collaborative sites and web publishing to Line-Of-Business data integration, business intelligence solutions, and human workflows, leveraging the building blocks available in SharePoint in an easy to use environment. In addition, developers can use SharePoint Designer 2013 to get a quick start on SharePoint development projects.​
For more information, visit the following Microsoft website:

Process Monitor

Process Monitor is a monitoring tool for Windows that shows real-time file system, registry, process, and thread activity.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the Process Monitor tool:
ArticleProcess Monitor - Hands-On Labs and Examples
The goal of this post is to help you gain hands-on experience using this valuable troubleshooting tool and subsequently to facilitate progress towards resolving virtualization issues with your apps should they be encountered.
VideoThe Case of the Unexplained 2011
Come hear Mark Russinovich, the master of Windows troubleshooting, walk you through step-by-step how he has solved seemingly unsolvable system and application problems on Windows.
VideoThe Case of the Unexplained 2010
Come hear Mark Russinovich, the master of Windows troubleshooting, walk you through step-by-step how he has solved seemingly unsolvable system and application problems on Windows.
VideoThe Case of the Unexplained 2009
Come hear Mark Russinovich, the master of Windows troubleshooting, walk you through step-by-step how he has solved seemingly unsolvable system and application problems on Windows.
VideoThe Case of the Unexplained 2008
Come hear Mark Russinovich, the master of Windows troubleshooting, walk you through step-by-step how he has solved seemingly unsolvable system and application problems on Windows.

Office 365 Support Central Ap

With the Office 365 Support Central mobile app you can search for answers, view service health incidents, planned maintenance events, and message center notices, post questions and track your answers in the Office 365 for Business Support Community.
For more information, visit the following Windows Phone Store page:
Articles and Videos
Videohttp://aka.ms/O365SupportCentralAppvideo
Watch a guided tour of the app and how to use it effectively on your phone to get the most out of it.

Office 365 Health, Readiness, and Connectivity Checks

The Office 365 Health, Readiness, and Connectivity Checks provide Office 365 customers with validation of both client and service configuration. The tool can be used to validate configuration for clients Outlook, Skype for Business, Office 365 ProPlus, and One Drive. The tools also checks On-premise Exchange Servers and Directory Synchronization Servers and surfaces any configuration conflicts that may cause issues when using Office 365. Office 365 Customers are required to log into Office 365 when using this tool.
For more information, visit the following Microsoft website:

Nslookup

Nslookup.exe is a command-line tool that you can use to test and troubleshoot DNS issues. You can use Nslookup to perform DNS queries and to examine the contents of zone files on local and remote servers. Nslookup is available only if the TCP/IP protocol is installed on the computer.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the Nslookup tool:
ArticleSingle sign-on authentication to Office 365 doesn't work from a specific device, but works from other devices
This article shows you how to troubleshoot several of the error messages that may occur when you try to access Office 365 resources through a web-based client or a rich client application by using federated user credentials, or when you use a web browser to access the Office 365 portal from the same computer by using federated credentials.
ArticleHow to troubleshoot Windows Azure Active Directory Sync tool installation and Configuration Wizard error messages
This article discusses general troubleshooting procedures, lists error messages that may occur when you install or configure the Directory Synchronization tool, and contains information about how to resolve the issue.
ArticleTroubleshoot domain verification issues in Office 365
This article shows you how to troubleshoot issues that may occur when you try to verify a domain in Office 365.

Nltest

Nltest perform network administrative tasks. For example, you can use it to obtain a list of domain controllers, force a remote shutdown, query the status of trust, and test trust relationships and the state of domain controller replication in a Windows domain.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the Nltest tool:
ArticleHow to troubleshoot Windows Azure Active Directory Sync tool installation and Configuration Wizard error messages
This article discusses general troubleshooting procedures, lists error messages that may occur when you install or configure the Directory Synchronization tool, and contains information about how to resolve the issue.

Microsoft Remote Connectivity Analyzer (Web)

The Microsoft Remote Connectivity Analyzer (RCA) is a web-based tool that can help you confirm that connectivity for Exchange servers is configured correctly and to diagnose any connectivity issues. RCA website offers tests for Microsoft Exchange ActiveSync, Exchange Web Services, Microsoft Office Outlook, and Internet email.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the Microsoft Remote Connectivity Analyzer tool:
ArticleError message when you try to migrate users from an on-premises Exchange Server environment to Exchange Online in Office 365: "Unable to connect to the server"
When you use the E-mail Migration Wizard in Exchange Control Panel in the Office 365 portal to try to migrate users from an on-premises Microsoft Exchange Server 2010, Exchange Server 2007, or Exchange Server 2003 environment to Exchange Online in Office 365, you receive an error message.
ArticleFederated users can't connect to an Exchange Online mailbox
You cannot use your Office 365 federated credentials to authenticate Microsoft Outlook or Microsoft Exchange ActiveSync by using a smartphone to Exchange Online services.
ArticleHow to diagnose single sign-on (SSO) logon issues in Office 365 by using Remote Connectivity Analyzer
This article describes how to diagnose single sign-on (SSO) logon issues in Office 365 by using Microsoft Remote Connectivity Analyzer. It also contains information about causes of common SSO failures and lists links to resources for how to troubleshoot the issue.
ArticleTroubleshooting Skype for Business Online DNS configuration issues in Office 365
This article describes how to troubleshoot Skype for Business DNS configuration using RCA.

MFCMAPI

The MFCMAPI tool is a sample MAPI client. It uses Microsoft published APIs to provide access to MAPI stores through a graphical user interface. MFCMAPI is used to help investigate Exchange and Outlook issues and to give developers a canonical sample for MAPI development.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the MFCMAPI tool:
ArticleError message when you try to use Outlook to perform an action on a calendar meeting item: "This message could not be sent because it exceeds the maximum size allowed"
When you try to use Microsoft Outlook to perform an action on a calendar meeting item in a Office 365 environment or in a Microsoft Business Productivity Online Standard Suite environment, you receive an error message.
ArticleHow to use MFCMAPI to create a MAPI profile to connect to Office 365
This MSDN blog post shows you how to connect to Office 365 with MFCMAPI

Ldp

Ldp is a Lightweight Directory Access Protocol (LDAP) client that enables you to perform operations such as connect, bind, search, modify, add, and delete against any LDAP-compatible directory, such as Active Directory. LDP is used to view objects that are stored in Active Directory together with their metadata.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the FOPE tool:
ArticleLdp (TechNet)
This article provides information about Ldp.
ArticleUsing Ldp.exe to Find Data in the Active Directory
This article describes how to use Ldp.exe to find data in the Active Directory.

Exchange Remote PowerShell

Remote PowerShell is the administrative interface that enables you to manage your Microsoft Exchange Online organization from the command line.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the Exchange Online PowerShell tool:
ArticleHow to troubleshoot Windows PowerShell issues that affect Exchange Online for Office 365
This article describes how to troubleshoot Windows PowerShell issues that affect Microsoft Exchange Online for Microsoft Office 365.
ArticleHow to set Exchange Online mailbox sizes and limits in the Office 365 environment
This article describes how to use Exchange Online PowerShell to set Exchange Online mailbox sizes and limits in the Microsoft Office 365 environment.
ArticleHow to use Windows PowerShell to grant an admin access to all user mailboxes in Office 365
This article describes how to use Windows PowerShell to grant an admin access to all user mailboxes in a Microsoft Office 365 organization through Microsoft Outlook and Outlook Web App.
ArticleHow to manage the maximum concurrent migration batches in Exchange Online in Office 365
This article describes how to manage the number of concurrent migration batches in Microsoft Exchange Online in Microsoft Office 365.
ArticleTransport and Mailbox rules in Exchange Online don't work as expected
This article describes how to troubleshoot issues when transport and mailbox rules don't work as expected.

Event Viewer

Event Viewer displays detailed information about significant events on your computer. It enables you to filter for specific events across multiple event logs. Use it to help troubleshoot problems and errors in Windows and in other programs.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the Event Viewer tool:
ArticleHow to view and to troubleshoot events that are logged by Office Professional Plus 2010 for Office 365 in Event Viewer
This article describes how to view and to troubleshoot events that are logged by Microsoft Office Professional Plus for Microsoft Office 365 in Event Viewer.
ArticleHow to troubleshoot password synchronization when using the Windows Azure Active Directory Sync tool
This article contains information to help you troubleshoot common issues that you may encounter when you use the Windows Azure Active Directory Sync tool together with password synchronization.

ADPlus

ADPlus.vbs (ADPlus) is a tool that you can use to troubleshoot a process or an application that stops responding (hangs) or fails (crashes). It automates the Microsoft Console Debugger (CDB) to produce memory dumps and log files that contain debug output from one or more processes. ADPlus is included in the Debugging Tools for Windows.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the ADPlus tool:
ArticleHow to troubleshoot Windows Azure Active Directory Sync tool installation and Configuration Wizard error messages
This article discusses general troubleshooting procedures, lists error messages that may occur when you install or configure the Directory Synchronization tool, and contains information about how to resolve the issue.
ArticleHow to use ADPlus.vbs to troubleshoot "hangs" and "crashes"
ADPlus.vbs (ADPlus) is a tool from Microsoft Product Support Services (PSS) that can troubleshoot any process or application that stops responding (hangs) or fails (crashes). Frequently, you can use ADPlus as a replacement tool for the Microsoft Internet Information Server (IIS) Exception Monitor (6.1/7.1) and User Mode Process Dump. These are two separate tools that PSS frequently uses to isolate what causes a process to stop responding (hang) or quit unexpectedly (crash) in a Microsoft Windows DNA environment.

Active Directory Service Interfaces Editor (ADSI Edit)

ADSI Edit is a Lightweight Directory Access Protocol (LDAP) editor that you can use to manage objects and attributes in Active Directory. ADSI Edit (Adsiedit.msc) provides a view of every object and every attribute in an Active Directory forest. You can use ADSI Edit to query, to view, and to edit attributes that are not exposed through other Active Directory Microsoft Management Console (MMC) snap-ins.
For more information, visit the following Microsoft website:

Articles and Videos

The following articles and videos demonstrate how to troubleshoot and diagnose issues using the ADSI Edit tool:
ArticleError when you try to run the Windows Azure Active Directory Sync tool: "LDAP injection characters were found in the user alias"
This article shows you how to troubleshoot the "LDAP injection characters were found in the user alias. Change the user alias in the on-premises Active Directory" email error message that may occur when you try to run directory synchronization in Office 365.
ArticleError when you try to run the Windows Azure Active Directory Sync Tool Configuration wizard: "The Enterprise Administrator credentials that you supplied are not valid."
This issue may occur if you type incorrect Enterprise Administrator credentials on the Active Directory Credentials page of the Microsoft Online Services Directory Synchronization Configuration wizard.
ArticleHow to use SMTP matching to match on-premises user accounts to Office 365 user accounts for directory synchronization
This article discusses how this transfer of the source of authority is affected by "SMTP matching," a process that uses the primary Simple Mail Transport Protocol (SMTP) address to match the on-premises user account with the Office 365 user account.
ArticleMail-enabled groups that have an email address aren't synchronized to Office 365
When you use the Microsoft Online Services Directory Synchronization tool to synchronize your on-premises Active Directory environment to Microsoft Office 365, you notice that mail-enabled groups that have an email address are not synchronized to Office 365.

Saturday, August 22, 2015

SharePoint 2013: Hello World SharePoint-hosted app

This sample has been replaced with the series of samples found at: OfficeDev/SharePoint_SP-hosted_Add-Ins_Tutorials.

The sample demonstrates how to create, package, and deploy a custom list to the appweb and a custom action to the parent web.
The JavaScript code that reads data from the parent web and the app web is located in the Home.aspx file in the BasicSharePoint-hosted directory of the BasicSharePoint-hosted project. The following screen shot shows how the Home.aspx page of the app appears after you install and launch the app.
Figure 1. Home.aspx page in the app, displaying the user, the Bing home page and a button for getting information about the appweb

Prerequisites

This sample requires the following:
  • A SharePoint development environment that is configured for app isolation.
  • Visual Studio and Office Tools for Visual Studio installed on your developer computer.

Key components of the sample

The sample app contains the following:
  • BasicSharePoint-hosted project
  • AppManifest.xml file, located in the BasicSharePoint-hosted directory
  • Home.aspx file, located in the BasicSharePoint-hosted\Pages directory, which contains the HTML and ASP.NET controls for the app’s user interface
  • App.js file, located in the BasicSharePoint-hosted\Scripts directory, which contains the JavaScript code that populates the controls in the Home.aspx file
  • Elements.xml file, located in the BasicSharePoint-hosted\HelloWorldCustomAction directory, which configures the custom action

Configure the sample

To configure the hello world SharePoint-hosted sample app, update the SiteUrl property of the solution with the URL of the home page of your SharePoint test site.

Build the sample

Press F5 to build and deploy the app.

Run and test the sample

  1. Choose Trust It on the consent page to grant permissions to the app.
  2. Choose the Get Count of Lists button to see the number of lists in the appweb.

Troubleshooting

The following table lists common configuration and environment errors that prevent the sample from running or deploying properly and how to solve them.
Problem Solution
Visual Studio does not open the browser after you press the F5 key. Set the app for SharePoint project as the startup project.
HTTP error 405 Method not allowed. Locate the applicationhost.config file in %userprofile%\Documents\IISExpress\config. Locate the handler entry for StaticFile, and add the verbs GET, HEAD, POST, DEBUG, and TRACE.




Change log

First version: July 16, 2012
Second version: March 6, 2013
Third version: January 16, 2014

Related content

View Tenant (ULS) Logs in SharePoint Online using CSOM

Even though the classes exist in the CSOM, the Microsoft Office 365 Engineering team has confirmed that this is something which is not poss...