RSS

Settings required to develop apps sharepoint 2013 on-premises

When developers don’t want to setup the domain Name in DNS, Visual Studio will modify the host file during debugging to skip the need of creating the Domain name in DNS for App development on Sharepoint 2013 development environment.

Pre-Req: Sharepoint 2013 root site collection created.

Step 1: Start App Management Service

$appManagementService = Get-SPServiceInstance | where {$_.TypeName -like “App Management Service”}

if($appManagementService.Status -ne “Online”) {
Write-Host “Starting App Management Service”
Start-SPServiceInstance $appManagementService | Out-Null
}
else{
Write-Host “App Management Service was already started”
}

# wait for App Management Service to start”
while ($service.Status -ne “Online”) {
# delay 5 seconds then check to see if service has started sleep 5
$service = Get-SPServiceInstance | where {$_.TypeName -like “App Management Service”}
}

Step2: Start Subscription Settings Service

$subscriptionSettingsService = Get-SPServiceInstance | where {$_.TypeName -like “Microsoft SharePoint Foundation Subscription Settings Service”}

if($subscriptionSettingsService.Status -ne “Online”) {
Write-Host “Starting Subscription Settings Service”
Start-SPServiceInstance $subscriptionSettingsService | Out-Null
}
else{
Write-Host “Subscription Settings Service was already started”
}

while ($service.Status -ne “Online”) {
# delay 5 seconds then check to see if service has started sleep 5
$service = Get-SPServiceInstance | where {$_.TypeName -like “Microsoft SharePoint Foundation Subscription Settings Service”}
}

Step 3: Create Service Application and Proxy for App Management Service

$appManagemetnServiceApplicationName = “App Management Service”
$appManagementServiceApplication = Get-SPServiceApplication | where {$_.Name -eq $appManagemetnServiceApplicationName}

# create an instance App Management Service Application and proxy if they do not exist
if($appManagementServiceApplication -eq $null) {
Write-Host “Creating App Management Service Application…”
$pool = Get-SPServiceApplicationPool “SharePoint Web Services Default”
$appManagementServiceDB= “Sharepoint_AppManagementServiceDB”
$appManagementServiceApplication = New-SPAppManagementServiceApplication `
-ApplicationPool $pool `
-Name $appManagemetnServiceApplicationName `
-DatabaseName $appManagementServiceDB

Write-Host “Creating App Management Service Application Proxy…”
$appManagementServicApplicationProxy = New-SPAppManagementServiceApplicationProxy `
-ServiceApplication $appManagementServiceApplication

}
else{
Write-Host “App Management Service Application already exist…”
}

Step 4: Create Service Application and Proxy for Subscription Setting Service

$subscriptionSettingsServiceApplicationName = “Subscription Settings Service Application”
$subscriptionSettingsServiceApplication = Get-SPServiceApplication | where {$_.Name -eq $subscriptionSettingsServiceApplicationName}

# create an instance Subscription Service Application and proxy if they do not exist
if($subscriptionSettingsServiceApplication -eq $null) {
Write-Host “Creating Subscription Settings Service Application…”
$pool = Get-SPServiceApplicationPool “SharePoint Web Services Default”
$subscriptionSettingsServiceDB= “Sharepoint_SiteSubscriptionSettingsServiceDB”
$subscriptionSettingsServiceApplication = New-SPSubscriptionSettingsServiceApplication `
-ApplicationPool $pool `
-Name $subscriptionSettingsServiceApplicationName `
-DatabaseName $subscriptionSettingsServiceDB

Write-Host “Creating Subscription Settings Service Application Proxy…”
$subscriptionSettingsServicApplicationProxy = New-SPSubscriptionSettingsServiceApplicationProxy `
-ServiceApplication $subscriptionSettingsServiceApplication

}
else{
Write-Host “Subscription Settings Service Application already exist…”
}

Step 5: Assign root domain name to configure URL used to access app webs

Set-SPAppDomain “apps.com” –confirm:$false

Step 6: Assign name to default tenant to configure URL used to access web apps

Set-SPAppSiteSubscriptionName -Name “app” -Confirm:$false

 
Leave a comment

Posted by on March 12, 2014 in Sharepoint

 
Link

Sharepoint 2013 Search

Good Demo of SharePoint 2013 Search features

 
Leave a comment

Posted by on January 28, 2014 in Sharepoint

 

Dealing Sharepoint 2010 Performance Issues

Analysis, Debugging and Monitor

1) Use the SharePoint Dispose Checker Tool (SPDispose) to find memory leaks in custom software: http://archive.msdn.microsoft.com/SPDisposeCheck

2) Enable the SharePoint developer dashboard and enable SQL Profiler to check SQL Server database problems

3) Get the Process Monitor tool for monitoring real-time file system, registry, and process/thread activity: http://sharepointdragons.com/2012/04/09/process-monitor/

4) If page load is very slow, check if the ACL count is the problem, even when it’s well within the official limits: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/aa37c03c-11b1-421c-baf7-47f27349e3e9

5) Get to know SharePoint, its usage, and its response times by studying the IIS logs. One of the ways to do this is to use the free SharePoint Flavoured Weblog Reader (SFWR) tool: http://gallery.technet.microsoft.com/The-SharePoint-Flavored-5b03f323

6) Use the SharePoint Diagnostic Data Provider/Logging database to get more insight into your environment. Check out http://sharepointdragons.com/2011/11/16/leveraging-the-logging-database-to-see-performance-counters/ and http://sharepointdragons.com/2011/12/05/using-the-entity-framework-to-see-the-contents-of-the-sharepoint-logging-database/

7) Use 3rd party analysis tools: http://webtrends.com/products/integrations/sharepoint/, http://www.intlock.com/intlocksite/productsandservices/cardiolog/cardiolog.asp, http://www.intlock.com/intlocksite/productsandservices/cardiolog-sharepoint-marketing-suite/default.asp (that includes Cardiolog), http://www.idera.com/Free-Tools/SharePoint-perf-monitor/, or http://www.idera.com/Free-Tools/SharePoint-admin-toolset/

8) Monitor performance counters that are relevant for SharePoint. The gallery post http://gallery.technet.microsoft.com/PowerShell-script-for-59cf3f70 shows an overview of a set of relevant performance counters that have been established after careful research, and a small PowerShell script for reading them. Also see http://technet.microsoft.com/en-us/library/ff758658.aspx for a different perspective.

9) Get the SharePoint Administration Toolkit. It contains a load testing kit that can be employed to determine if an environment is able to handle the current load. It also contains SharePoint Diagnostic Studio 2010, a tool used by Microsoft personnel for troubleshooting. It’s able to capture lots of information about performance counters, ULS log files, and so on. See http://sharepointdragons.com/2011/11/28/the-sharepoint-administration-toolkit-for-sharepoint-2010/  for more information. If you find you’re having trouble that the ULS log files are empty, check out the following Wiki page: http://sharepointdragons.com/2012/04/11/solving-problems-with-uls-log-file-generation/

10) Get PAL, a tool for troubleshooting performance troubles. See http://sharepointdragons.com/2011/12/30/when-you-have-performance-troubles-you-need-a-pal/ for more info. See http://www.loisandclark.eu/Pages/warmup.aspx for more info.

Optimization Considerations
1) The first authenticated user may experience a very poor response time. Consider warming up SharePoint. See http://www.loisandclark.eu/Pages/warmup.aspx for more info.

2) Enable ASP.NET profiling (http://technet.microsoft.com/en-us/library/cc261797.aspx), object cache (http://technet.microsoft.com/en-us/library/cc261797.aspx),  enable output cache.

3) Shrink the SharePoint content database transaction log files if they become too big or when it’s size increases abnormally: http://sharepointdragons.com/2012/02/08/managing-sharepoint-2010-log-files/

4) Enable BLOB cache. See http://technet.microsoft.com/en-us/library/cc261797.aspx , http://www.ittreats.com/microsoft/aspnet/configure-blob-cache-for-sharepoint-2010-web-applications.html

5) Enable IIS compression. See http://weblogs.asp.net/owscott/archive/2009/02/22/iis-7-compression-good-bad-how-much.aspx

6) Configure list throttling. See http://technet.microsoft.com/en-us/magazine/gg491393.aspx

7) Use list indexes: http://blog.dynatrace.com/2009/01/28/sharepoint-list-performance-how-list-column-indices-really-work-under-the-hood/

8) Limit the maximum upload file size

9) If you’re working with extremely large files, consider using Remote Blob Storage (RBS): http://www.loisandclark.eu/Pages/blob.aspx and http://www.sharepointedutech.com/2011/07/11/sharepoint-contentdb-guidance-too-many-shades-of-gray-along-with-a-little-brown/

10) Follow best practices when using the Content Query Web Part (CQWP): http://techblog.ranjanbanerji.com/post/2007/07/16/Content-Query-Web-Part-(CQWP)-SharePoint-2007-Performance.aspx

11) Use a 3rd party performance optimizer tool for SharePoint (that uses compression, caching, and action prioritizing) such as Aptimizer: http://www.riverbed.com/us/products/stingray/stingray_aptimizer.php

Performance Testing for SharePoint

1) Do performance and stress testing, even if you’re already in trouble. It helps a lot to be able to simulate when a comparable environment gets into trouble. See http://sharepointdragons.com/2012/02/10/sharepoint-performance-and-stress-testing/ , http://sharepointdragons.com/2012/02/28/sharepoint-2010-testing/ , http://social.technet.microsoft.com/wiki/contents/articles/7828.sharepoint-2010-useful-information-about-testing.aspx , and http://technet.microsoft.com/en-us/library/ff758659.aspx

2) Use tools to test traffic on-the-fly:
Fiddler ( http://www.fiddler2.com/fiddler2/), YSlow ( https://addons.mozilla.org/de/firefox/addon/yslow/),  and WireShark (http://www.wireshark.org/)

 

Plan and Study

1) Study other performance and capacity test results and recommendations: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=12768  and http://technet.microsoft.com/en-us/library/ff608068(office.14).aspx

2) Even if your environment is already up and running, do capacity planning. This way you can check if you’re crossing any important limits that might threaten performance. Check out http://sharepointdragons.com/2011/12/05/sharepoint-capacity-planning/ and http://sharepointdragons.com/2012/02/03/more-capacity-planning-links/ . Also check out http://gallery.technet.microsoft.com/Maxer-for-SharePoint-2010-8cd0f26f, Maxer for SharePoint 2010 is a tool that checks for capacity boundaries in existing SharePoint farms.  Do remember that content database limits include remote BLOBs (if you use them) and that auditing has a great impact on capacity planning: http://www.sharepointedutech.com/2011/07/11/sharepoint-contentdb-guidance-too-many-shades-of-gray-along-with-a-little-brown/

3) Study the set up of the database environment, which is crucial for the success of your SharePoint environment. The SharePoint 2010 Administrator’s Companion contains an excellent chapter about this: http://www.amazon.com/Microsoft-SharePoint-2010-Administrators-Companion/dp/0735627207/ref=sr_1_2?s=books&ie=UTF8&qid=1330935904&sr=1-2

 
Leave a comment

Posted by on November 27, 2013 in SqlServer

 

Useful links for SharePoint 2010 Branding

StYles

First add the CSS to the master page:

Starter Master Pages

Branding a Master Page

Fixed Width Layout

Dialog Boxes

Rounded Web Parts

Fixed Width

Sticky Footer

Ribbon

Navigation

SearchBox 
Search Center

My Sites

Rich Text Editor

Print

Slideshow

Web Parts

Content Query Web Parts

Dataview Web Part

 Downloads

Article Series

 
Leave a comment

Posted by on October 4, 2012 in Sharepoint

 

Important SharePoint 2013 Features

Shredded Storage
In SharePoint 2010, if version history is enabled on a document library, each new version results in a new BLOB for that document. Second, I/O performance is problematic in SharePoint 2010. There’s an unnecessary file read that occurs when changes.At the highest level, what SharePoint 2013 shredded storage does is “chunk” or “page” the BLOB into numerous smaller shreds. So a single BLOB is now a construct made up of numerous shreds.So, for example, if you have versioning enabled and a user makes a change to a document, only changed shreds are added to the storage footprint of that document. Shreds that have not changed from the previous version are simply “associated” with both versions. Shredded storage also reduces the amount of information about a file that has to be retrieved by the web server from the content database, so I/O improves.

Business Connectivity Services
Support for OData Business Data Connectivity (BDC) connections, in addition to connections for WCF, SQL Server, and .NET assemblies. An event listener with an event subscriber on the SharePoint 2013, to enable SharePoint users to receive notifications of changes to the external system. Self-contained apps for SharePoint.

eDiscovery
eDiscovery center is new site template, which creates a portal for managing cases—you can access cases to search, hold content, and export content.You can also now take the results of your eDiscovery search—including documents, wiki pages, Exchange email messages and tasks– and export them into a review tool.

Records management and compliance
Enhanced compliance simply by extending retention policies to SharePoint sites.

Business intelligence
New features in Excel for business intelligence (BI): In-Memory BI Engine (IMBI) for near-instant analysis of millions of rows of data; Power View Add-in for Excel, which offers visualizations, animations, and smart querying to enable users to visualize modeled data; decoupled PivotChart and PivotTable reports allowing for the creation of PivotChart reports without having to add a PivotTable report on the same page; and the ability to do trend analysis from cells in PivotTable reports that use OLAP data.

Workflow
Microsoft made architectural changes in SharePoint Workflow.But if you want the SharePoint 2013 workflow platform, you need to install and configure Windows Azure Workflow to communicate with your 2013 farm.These new features include a visual workflow that uses a Visio 2013 Preview add-in, the ability to enable no-code web service calls from inside a workflow, new actions for the task process, the ability to start a workflow built on SharePoint 2010 from a workflow built on SharePoint 2013, and new workflow building blocks called Stage, Loop, and App Step.

 
Leave a comment

Posted by on September 28, 2012 in Sharepoint

 

Tools for sharepoint 2010

FAST Search Explorer Tool
http://blogs.technet.com/b/speschka/archive/2010/08/15/free-developer-search-tool-for-sharepoint-2010-search-and-fast-search-for-sharepoint.aspx
http://fastforsharepoint.codeplex.com/

Master Pages Developer Tool for SharePoint 2010
http://startermasterpages.codeplex.com/

SharePoint Dispose Checker Tool
http://archive.msdn.microsoft.com/SPDisposeCheck

SharePoint Warmup Job utility
http://www.andrewconnell.com/blog/archive/2010/03/27/introducing-the-sharepoint-site-collection-keep-alive-job.aspx

SharePoint 2010 Administration Toolkit
http://technet.microsoft.com/en-us/library/cc508851.aspx

 
Leave a comment

Posted by on June 29, 2012 in Sharepoint

 

Tags:

Tools to check fast index status

Run “Indexerinfo status” on fast crawl machine to check index count and non index counts

<documents size="32611257.000000" total="1" indexed="1" not_indexed="0"/>

“indexeradmin resetindex” can resume the indexer

 
Leave a comment

Posted by on June 26, 2012 in Sharepoint

 

Three esstential tools for MVC

DI or LOC Container: Ninject or Unity by Microsoft.

Unit Testing: NUnit or XUnit

Mocking: Moq or Rhino Mock

 
Leave a comment

Posted by on June 8, 2012 in Asp.Net

 

Tags:

C# coding techniques

Object Initializing
class Program {
static void Main(string[] args) {

// create a new Phone object
ConfigPhone(new Phone {
ID = 1, Name = “HTC”,
Description = “Mobile Phone”,
Price = 500, Category = “Mobile Phone”
});
}

private static void ConfigPhone( Phone phoneParam) {
//…statements to config phone
}
}

Initializing Generics, Collections and Arrays
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
string[] strArray = { “HTC”, “IPhone”, “Nokia” };
List<int> intList = new List<int> { 10, 20, 30, 40 };
Dictionary<string, int> dict = new Dictionary<string, int> {
{ “HTC”, 100 },
{ “IPhone”, 500 },
{ “Nokia”, 800 }
};
}
}

Extension Methods
using System.Collections.Generic;
public class Catalog {
public List<Product> Products { get; set; }
}

public static class AppExtensionMethods {
public static decimal TotalPrices(this Catalog prodParam) {
decimal total = 0;
foreach (Product prod in prodParam.Products) {
total += prod.Price;
}
return total;
}
}

The this keyword in front of the first parameter marks TotalPrices as an extension method. The first parameter tells .NET which class the extension method can be applied to.

using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
// create and populate Catalog
Catalog cart = new Catalog {
Products = new List<Product> {
new Product {Name = “Apple”, Price = 10},
new Product {Name = “Orange”, Price = 20},
new Product {Name = “Plam”, Price = 20},
new Product {Name = “PineApple”, Price = 30}
}
};
// get the total value of the products in the cart
decimal cartTotal = cart.TotalPrices();
Console.WriteLine(“Total: {0:c}”, cartTotal);
}
}

Lambda Expression
IEnumerable<Product> filteredProducts = products.Filter(prod =>
prod.Category == “Soccer” || prod.Price > 20);
And finally, if we need logic in the lambda expression that requires more than one statement, we can do so by using braces ({}) and finishing with a return statement, like this:
(prod, count) => {
//…multiple code statements
return result;
}

Automatic Type Inference
var myVariable = new Product { Name = “Milk”, Category = “Liquid”, Price = 10 };
string name = myVariable.Name;
The C# var keyword allows you to define a local variable without explicitly specifying the variable type. It is not that myVariable doesn’t have a type. It is just that we are asking the compiler to infer it from the code.

Anonymous Types
By combining object initializers and type inference, we can create simple data-storage objects without needing to define the corresponding class or struct.
var myProduct = new {
Name = “AUDI”,
Category = “CAR”
};
Console.WriteLine(“Name: {0}, Type: {1}”, myProduct.Name, myProduct.Category);

Language Integrated Queries (LINQ)
LINQ is a SQL-like syntax for querying data in classes.
Var results = from product in products
orderby product.price descending
Select new {product.Name, product.Price};

We order the Product objects in descending order and use the select keyword to return an anonymous type that contains just the properties we want. This style of LINQ is known as query syntax.

var results = products
.OrderByDescending(product => product.Price)
.Take(3)
.Select(product => new { product.Name, product.Price });

This style of LINQ is known as DOT notation syntax, Each of the LINQ extension methods is applied to an IEnumerable<T> and returns an IEnumerable<T>, which allows us to chain the methods together to form complex queries.The OrderByDescending method rearranges the items in the data source. In this case, the lambda expression returns the value we want used for comparisons. The Take method returns a specified number of items from the front of the results (this is what we couldn’t do using query syntax). The Select method allows us to project our results, specifying the result we want. In this case, we are projecting an anonymous object that contains the Name and Price properties. Notice that we have not even needed to specify the names of the properties in the anonymous type. C# has inferred this from the properties we picked in the Select method.

var result = products.Max(item1 => item1.price);
Gets the maximum priced product

 
Leave a comment

Posted by on June 5, 2012 in Asp.Net

 

Two best-known open source browser automation tools for .NET developers

  • Selenium RC (http://seleniumhq.org/), which consists of a Java “server” application that can send automation commands to Internet Explorer, Firefox, Safari, or Opera, plus clients for .NET, Python, Ruby, and multiple others so that you can write test scripts in the language of your choice. Selenium is powerful and mature; its only drawback is that you have to run its Java server.

  • WatiN (http://watin.sourceforge.net/), a .NET library that can send automation commands to Internet Explorer or Firefox. Its API isn’t as powerful as Selenium, but it comfortably handles most common scenarios and is easy to set up (you need to reference only a single dynamic-link library).

 
Leave a comment

Posted by on June 5, 2012 in Asp.Net

 

Tags:

 
Design a site like this with WordPress.com
Get started