Ads

Showing posts with label others. Show all posts
Showing posts with label others. Show all posts

Monday, 8 July 2013

Developer Dashboard with powershell command to make it on/Off

One of the new feature in SharePoint 2010 is Developer dashboard. With help of Developer Dashboard we can get view of SharePoint enviroment and find out issues if occuring. This Provides us info about Call Stacks, Web Server, Critical Events, Database Queries, Service Calls, SP Requests, and Webpart Events. This even shows the time being taken to execute any code.

Under Database Calls this will even provide us the hyperlinks. We can click on the link and it will show us a dialog and we can see the SQL commands being Called.



Mode of developer dashboard:
On – creates everytime the output at the end of the page content
Off – switch off developer dashboard and nothing is rendered
OnDemand – creates a DeveloperDashboard icon to make dashboard output visible as needed

How to turn on Developer Dashboard?
Open Sharepoint 2010 Management Shell and type the following commands:

##Turn on
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService 
$dashboard = $contentService.DeveloperDashboardSettings
$dashboard.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On
$dashboard.Update()

##Turn on Demand Mode
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$dashboard = $contentService.DeveloperDashboardSettings
$dashboard.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand
$dashboard.Update()

##Turn Off
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$dashboard = $contentService.DeveloperDashboardSettings
$dashboard.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off
$dashboard.Update()

##Turn On demand using stsadm
stsadm -o setproperty -pn developer-dashboard -pv ondemand

Monday, 1 July 2013

Encode url sharepoint

SPHttpUtility.HtmlUrlAttributeEncode(url)

Saturday, 11 May 2013

Take IIS Backup in sharepoint server

Step1: Start --> Administrative Tools-->IIS Manager 
Step2: Right Click on Computer Name --> All Tasks--> Backup/Restore 
Step3: Click on Create Backup 
Step4: Name the Backup File and make the backup file password protected 
Step5: Done!! 
Step6: Check the Backup file in C:\WINDOWS\system32\inetsrv\MetaBack it will be in 2 names . 
Step7: to restore them Click on Restore option

Wednesday, 3 April 2013

Folders present in SharePoint 2010 14\TEMPLATE directory


Introduction

TEMPLATE folder is one of the most important file folder of SharePoint where the templates, pages, masterpages will reside.
We will check the breakdown structure of directory and what each folder is meant for in SharePoint.Understanding this folder structure is important to get clear picture on, how and where SharePoint will house our deployed items.

TEMPLATE Directory

The installation path of the TEMPLATE directory will be

[root directory]:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE

Following is image of TEMPLATE directory breakdown structure in SharePoint 2010
TEMPLATE folder structure

1033

This sub-directory contains templates for various documents, XML files, and workflows.
This number corresponds to the language localization for English.
If SharePoint is installed with other languages being primary, the number will be different.

ADMIN

The ADMIN sub-directory contains ASP.NET server pages that correspond to administrative
tasks. Most of them will be accessed through the Central Administration site.

CONTROLTEMPLATES

This is one of the common sub-directory used by many. This contains ASP.NET user controls that are utilized by SharePoint.Also while SharePoint customization, folders will be deployed to house the project related files.
For example, if we create any visual web parts the user controls will be deployed as folders in this sub-directory.

DocumentTemplates

The only thing stored in this directory is the standard ASP.NET server page for wikis.

FEATURES

The FEATURES sub-directory contains 250+ folders, which represent the core features of SharePoint 2010.
Each of these folders contain a Feature.xml file, which identifies to SharePoint 2010 several characteristics such as the identity, scope, resources and manifest location of the feature. SharePoint customization deployed as features will be deployed to this sub-directory.

GLOBAL

This sub-directory houses the standard ASP.NET master pages that deploy with SharePoint
2010, such as the v4, default, and minimal master pages.
Also here are global templates for site definitions, views, and schema for list templates.

IDENTITYMODEL

This sub-directory contains default login pages for the different types of authentication
models, such as Forms, Windows, Trust, and Card.

IMAGES

This sub-directory houses all of the standard images for the SharePoint product.
If you have images deployed as part of customized solutions, by default they will
be deployed as sub-folders of this sub-directory.

LAYOUTS

The LAYOUTS folder is the folder that contains a large portion of the ASP.NET server
pages that are used in the SharePoint product.
You can reference this directory from within a SharePoint site by using a format similar to the following: http://mysite/_layouts/viewlsts.aspx

Pages

Only three ASP.NET server pages are stored in this folder, named form, viewpage,
and webfldr.

Scenarios

This sub-directory contains wizard-style pages, used in some of the different services
with greater complexity, such as BCS, ProfileServiceApplication, and joining the
farm with a particular web server.

Site Templates

This sub-directory contains the site templates for the different built-in SharePoint
2010 web templates.

SQL

This sub-directory contains SQL table creation scripts for tables associated with
various types of SharePoint 2010 databases. Many of the services database creation
scripts are here, such as the UsageDB, the Diagnostics DB, and Configuration DBs.
Also stored here are upgrade scripts to upgrade from a SharePoint 2007 solution
to a SharePoint 2010 solution.

THEMES

This sub-directory houses the 23 built-in themes or looks that are installed with
SharePoint 2010.

XML

The XML sub-directory contains XML schema and document files related to various
configurations in SharePoint.

Solution Deployment/Retraction and Feature Activation/Deactivation internal process flow

When you deploy/retract SharePoint WSPs and Activate/Deactivate site collection or sub site level features at the farm level using PowerShell commands or activate/deactivate features from browser interface, SharePoint 2010 makes several changes at the different places on the servers and databases.









Lets see what really happens when you execute different farm level PowerShell commands.



Central Admin
Site/Web Level Features
GAC
Web.Config
14-RootFeatures
SharePoint Config DB, Objects Table – Solutions
SharePoint Config DB, Objects Table – Features
Web App Content DB, Features Table
Add-SPSolution
Solution Added but Not Deployed
N/A
N/A
N/A
N/A
Yes – Solution Definition Added
N/A
N/A
Install-SPSolution
Deployed to Web App
Installed Feature
Yes – DLLs Added
Yes – Safe Control Entries Added
Yes – Features Added
Yes – Solution Definition Still Exists
Yes – Feature Definition Added
N/A
Enable-SPFeature
Solution Still Deployed
Activated feature to Site/Web
Yes – Still Exists
Yes – Still Exists
Yes – Still Exists
Yes – Solution Definition Still Exists
Yes – Feature Definition Still Exists
YES – Feature Activation Link Added
Disable-SPFeature
Solution Still Deployed
Deactivated feature from Site/Web
Yes – Still Exists
Yes – Still Exists
Yes – Still Exists
Yes – Solution Definition Still Exists
Yes – Feature Definition Still Exists
NO – Feature Activation Link Deleted
UnInstall-SPFeature
Solution Still Deployed
Uninstalled feature
Yes – Still Exists
Yes – Still Exists
Yes – Still Exists
Yes – Solution Definition Still Exists
No – Feature Definition Deleted
N/A
UnInstall-SPSolution
Retracted from Web App
Uninstalled feature
No – DLLs Deleted
No – Safe Control Entries Deleted
No – Features Deleted
Yes – Solution Definition Still Exists
No – Feature Definition Deleted
N/A
Remove-SPSolution
Solution Deleted
N/A
N/A
N/A
N/A
Yes – Solution Definition Deleted
N/A
N/A


Hope this will help you to understand
Many Thanks

Template ID's in SharePoint 2010

Below are the list of IDs used for SharePoint Lists:
Sr.no
Temple name
Temple ID
1
Custom List
100
2
Document Library
101
3
Survey
102
4
 Links Link
103
5
Announcements 
104
6
Contacts
105
7
Events 
106
8
Task List
107
9
Discussion Board 
108
10
Picture Library 
109













List Definitions
These List Definitions come from the SPListTemplateType enumeration.

Enumeration Name Description ID
InvalidType Not used -1
NoListTemplate unspecified list type 0
GenericList Custom list 100
DocumentLibrary Document library 101
Survey Survey 102
Links Links 103
Announcements Announcements 104
Contacts Contacts 105
Events Calendar 106
Tasks Tasks 107
DiscussionBoard Discussion board 108
PictureLibrary Picture library 109
DataSources Data sources for a site 110
WebTemplateCatalog Site template gallery 111
UserInformation User Information 112
WebPartCatalog Web Part gallery 113
ListTemplateCatalog List Template gallery 114
XMLForm XML Form library 115
MasterPageCatalog Master Page gallery 116
NoCodeWorkflows No Code Workflows 117
WorkflowProcess Custom Workflow Process 118
WebPageLibrary Wiki Page Library 119
CustomGrid Custom grid for a list 120
SolutionCatalog Solutions 121
NoCodePublic No Code Public Workflow 122
ThemeCatalog Themes 123
DataConnectionLibrary Data connection library for sharing information about external data connections 130
WorkflowHistory Workflow History 140
GanttTasks Project Tasks 150
Meetings Meeting Series (Meeting) 200
Agenda Agenda (Meeting) 201
MeetingUser Attendees (Meeting) 202
Decision Decisions (Meeting) 204
MeetingObjective Objectives (Meeting) 207
TextBox Text Box (Meeting) 210
ThingsToBring Things To Bring (Meeting) 211
HomePageLibrary Workspace Pages (Meeting) 212
Posts Posts (Blog) 301
Comments Comments (Blog) 302
Categories Categories (Blog) 303
Facility Facility 402
Whereabouts Whereabouts 403
CallTrack Call Track 404
Circulation Circulation 405
Timecard Timecard 420
Holidays Holidays 421
IMEDic IME (Input Method Editor) Dictionary 499
ExternalList External 600
IssueTracking Issue tracking 1100
AdminTasks Administrator Tasks 1200
HealthRules Health Rules 1220
HealthReports Health Reports 1221

Content Types

These content types come from the Content Type ID list.
Content Type ID
System 0x
Item 0×01
Document 0×0101
Event 0×0102
Issue 0×0103
Announcement 0×0104
Link 0×0105
Contact 0×0106
Message 0×0107
Task 0×0108
Workflow History 0×0109
Post 0×0110
Comment 0×0111
East Asia Contact 0×0116
Folder 0×0120

Ads