Sunday, 19 April 2015

SharePoint URL Shortcuts


Here is the list of Quick URL Shortcuts to Frequent SharePoint Links: 
  • Add web parts to any page: append  ?PageView=Shared&ToolPaneView=2
  • Create New Site Content (List, Library, etc)  /_layouts/create.aspx
  • Create New Site: _layouts/NewsbWeb.aspx
  • List Template Gallery: _catalogs/lt/Forms/AllItems.aspx
  • Master Page Gallery: _catalogs/masterpage/Forms/AllItems.aspx
  • Manage your Alerts  _layouts/SubEdit.aspx 
  • Create New Alert: _layouts/SubChoos.aspx
  • Manage Site Collection Administrators  /_layouts/mngsiteadmin.aspx
  • Manage Sites and Workspaces /_layouts/mngsubwebs.aspx
  • Manage People  /_layouts/people.aspx
  • All People view: /_layouts/people.aspx?MembershipGroupId=0
  • Manage User Permissions /_layouts/user.aspx
  • Modify Navigation  /_layouts/AreaNavigationSettings.aspx
  • Modify Site Navigation: _layouts/SiteNavigationSettings.aspx
  • Recycle Bin /_layouts/AdminRecycleBin.aspx
  • Site Directory _layouts/SiteDirectorySettings.aspx
  • Save Site as Template: _layouts/savetmpl.aspx
  • Site Settings page: _layouts/settings.aspx
  • Create New Web Part Page: _layouts/spcf.aspx
  • Site Template Gallery : _catalogs/wt/Forms/Common.aspx
  • Site Column Gallery  /_layouts/mngfield.aspx
  • Site Content Types /_layouts/mngctype.aspx
  • User Information List /_catalogs/users/simple.aspx
  • Site Content and Structure Manager /_layouts/sitemanager.aspx
  • Site Usage Summary /_layouts/SpUsageWeb.aspx
  • User Alerts  /_layouts/sitesubs.aspx
  • View All Site Content /_layouts/viewlsts.aspx
  • Web Part Gallery: _catalogs/wp/Forms/AllItems.aspx
  • Web part maintenance mode:  append ?contents=1 to the URL of the page
  • Login as another user: /_layouts/closeConnection.aspx?loginasanotheruser=true
  • Open the page in Edit Mode:  In Address bar, Type "javascript:MSOLayout_ToggleLayoutMode();" or "javascript:MSOTlPn_ShowToolPane(’2′);" in the Address bar 

How to increase the timeout for a SharePoint 2010 website


The default timeout for an Http Request in SharePoint Foundation 2010 is 120 seconds*.  Any Http Requests above this 120 seconds will be met with a “Request timed out” error as displayed in the SharePoint logs:
Unexpected     System.Web.HttpException: Request timed out.
Note: The SharePoint logs can be found at: 
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
To increase this timeout you will need to modify the web.config file for the SharePoint Website.  If you are using the default SharePoint configuration, then the web.config file will be found at:
C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config
Open this file in Notepad and then scroll down to the system.web > httpRuntime element (about half way down the file).  To increase the timeout, add the executionTimeout attribute to the httpRuntime element with a value of the number of seconds for the timeout.  For example, to increase the timeout to 5 minutes, add an executionTimeout of 300 like this:
<httpRuntime maxRequestLength="51200" executionTimeout="300" />
In the default SharePoint Foundation 2010 web.config file it will look like this:
image
Save the web.config file and now the timeout for HttpRequests will have been increased (Of course you need to ask why a request is taking more than 2 minutes to justify increasing the timeout in the first place… increasing the timeout to make the error go away but yet your customers have a horrible user experience is not a valid solution).

*The ASP.NET MSDN reference indicates that the default setting for the executionTimeout property is 110 seconds: http://msdn.microsoft.com/en-us/library/e1f13641.aspx.  But the SharePoint logs show a timeout occurring at exactly 120 seconds with the default executionTimeout setting.  I am not sure where the extra 10 seconds are coming from but I used 120 seconds in this article since that is what someone will find when investigating the SharePoint logs.

Saturday, 18 April 2015

This page allows a limit of 200 controls, and that limit has been exceeded in SharePoint


I was working on custom New form which I had created in Visual Studio 2012 as aspx page and attched it to the list.
I had large number of controls in the page and found this error when i tried to browse it through browser.

The solution for this error was to change a setting in web.config.

Here I am working on SharePoint 2013

So I went to

C:\inetpub\wwwroot\wss\VirtualDirectories\

Now open webapplication Eg:80 where your site is hosted

open web.config

Find the tag below in the web.config

 <SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="250" AllowPageLevelTrace="false">  


by default  MaxControls="200" is set to 200.So you get the exception.

You can change this according to your requirement.

This is resolve the issue.



SharePoint 2010 Base Types, List Template and Definition IDs, and Content Types IDs


I’m often asked for a list of the IDs of the most common Base Types, List Definitions and Content Types. Especially useful if you’re writing CAML definitions of Lists, List Instances, or Content Types. Here are the lists I’ve gleaned from MSDN.

Base Types

These Base Types come from the SPBaseType enumeration.
Base TypeID
 Custom List0
 Document Library1
Not used2
 Obsolete. Use 0 for discussion boards.3
 Surveys4
 Issues List5

List Definitions

These List Definitions come from the SPListTemplateType enumeration.
Enumeration NameDescriptionID
InvalidTypeNot used-1
NoListTemplateunspecified list type0
GenericListCustom list100
DocumentLibraryDocument library101
SurveySurvey102
LinksLinks103
AnnouncementsAnnouncements104
ContactsContacts105
EventsCalendar106
TasksTasks107
DiscussionBoardDiscussion board108
PictureLibraryPicture library109
DataSourcesData sources for a site110
WebTemplateCatalogSite template gallery111
UserInformationUser Information112
WebPartCatalogWeb Part gallery113
ListTemplateCatalogList Template gallery114
XMLFormXML Form library115
MasterPageCatalogMaster Page gallery116
NoCodeWorkflowsNo Code Workflows117
WorkflowProcessCustom Workflow Process118
WebPageLibraryWiki Page Library119
CustomGridCustom grid for a list120
SolutionCatalogSolutions121
NoCodePublicNo Code Public Workflow122
ThemeCatalogThemes123
DataConnectionLibraryData connection library for sharing information about external data connections130
WorkflowHistoryWorkflow History140
GanttTasksProject Tasks150
MeetingsMeeting Series (Meeting)200
AgendaAgenda (Meeting)201
MeetingUserAttendees (Meeting)202
DecisionDecisions (Meeting)204
MeetingObjectiveObjectives (Meeting)207
TextBoxText Box (Meeting)210
ThingsToBringThings To Bring (Meeting)211
HomePageLibraryWorkspace Pages (Meeting)212
PostsPosts (Blog)301
CommentsComments (Blog)302
CategoriesCategories (Blog)303
FacilityFacility402
WhereaboutsWhereabouts403
CallTrackCall Track404
CirculationCirculation405
TimecardTimecard420
HolidaysHolidays421
IMEDicIME (Input Method Editor) Dictionary499
ExternalListExternal600
IssueTrackingIssue tracking1100
AdminTasksAdministrator Tasks1200
HealthRulesHealth Rules1220
HealthReportsHealth Reports1221

Content Types

These content types come from the Content Type ID list.
Content TypeID
System0x
Item0x01
Document0x0101
Event0x0102
Issue0x0103
Announcement0x0104
Link0x0105
Contact0x0106
Message0x0107
Task0x0108
Workflow History0x0109
Post0x0110
Comment0x0111
East Asia Contact0x0116
Folder0x0120