SlideShare uma empresa Scribd logo
1 de 20
Presented by
Narayana Reddy
Agenda
• Architecture
• Client Installation
• Debugging the Server
• Web Parts
• Application pages
• Custom fields
• Controls
• Questions
SharePoint 2010 Architecture
SharePoint 2010 Client Installation
Start with the SharePoint.exe file for SharePoint Foundation or SharePoint Server 2010. Extract the files from SharePoint.exe with the following
command line. A user account control (UAC) prompt might appear at this point.
SharePoint.exe /extract:c:SharePointFiles
This extracts all of the installation files to your hard drive. Use a folder you can recognize easily later, such as c:SharePointFiles. This allows you
to repeat the installation steps without extracting the package again and enables access to the configuration file that needs tweaking, to permit
installation on Windows Vista or Windows 7:
c:SharePointFilesFilesSetupconfig.xml
Add the following line to the end of the config.xml file:
<Setting Id="AllowWindowsClientInstall" Value="True"/>
The complete file should now look like this:
<Configuration>
<Package Id="sts">
<Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" />
</Package>
<DATADIR Value="%CommonProgramFiles%Microsoft SharedXWeb Server
Extensions14Data" />
<Logging Type="verbose" Path="%temp%" Template="Microsoft Windows
SharePoint Services 4.0 Setup *.log" />
<Setting Id="UsingUIInstallMode" Value="1" />
<Setting Id="SETUP_REBOOT" Value="Never" />
<Setting Id="AllowWindowsClientInstall" Value="True"/>
</Configuration>
Debugging the Server
 A web application consists of several parts. IIS plays a significant role—each request and
response passes through IIS. Debugging the server includes a way to debug IIS to see what data
is transmitted from the browser to the server and back. Despite debugging, performance issues
often arise. To test your SharePoint application under load, a stress test tool is essential.
 If your SharePoint server does not respond as expected and the debugger does not reveal useful
results—probably because an internal module beyond your access scope fails—you need more
tools. SharePoint hides error message and replaces stack traces, exception messages, and logs
with almost useless information. It's primarily designed for end users, and they might get
frightened when a NullReferenceException is displayed (e.g., "Did I lose all my data now?"). In
your development environment, you can turn on developer-friendly (and therefore user-
unfriendly) error messages by setting the appropriate parameters in the web.config
file:<configuration>
<SharePoint>
<SafeMode CallStack="true" ... />
...
</SharePoint>
<system.web>
<customErrors mode="off" />
...
</system.web>
</configuration>
How to Check Errors
 Look into the event log for SharePoint.
 Look into the SharePoint logs.
 Attach a debugger to the working process and watch for
exceptions.
 Look into the IIS logs.
 Add tracing to your code and watch the traces.
 Consider remote debugging if the target machine has no
debugger installed.
 Let's consider each of these alternatives in more detail.
 Looking into the Event Log for SharePoin
 Looking into the SharePoint and IIS Logs
SharePoint itself writes a lot of data into the logs if it is enabled in Central Administration. During the
development and test cycle, we strongly recommend activating the logs. You can find the logging files in
<%CommonProgramFiles%>Microsoft SharedWeb Server Extensions14L0GS
 The IIS logs are found here:
<%SystemRoot%>System32LogFiles Ex:(C:WindowsSystem32LogFiles)
The IIS logs contain information about each request and the response. If you match certain reactions of
SharePoint with the event of a specific request, there is a good chance of Unding the reason for some unexpected
behavior.
If you suspect that your code is causing the miss-behaviour and the debugger disturbs the data flow, a private
trace is a good option. Just write useful information from your code to a trace provider. You can turn tracing on
and off by setting the appropriate options in the application's web.config file:
<configuration>
<system.web>
<trace enabled="true" requestLimit="40" localOnly="false"/>
</system.web>
</configuration>
t
Activate the Developer Dashboard
$level="On"
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoi
nt")
[void][System.Reflection.Assembly]::LoadWithPartialName
("Microsoft.SharePoint.Administration")
$contentSvc=[Microsoft.SharePoint.Administration.SPWebService]::ContentSer
vice
$contentSvc.DeveloperDashboardSettings.DisplayLevel=
([Enum]::Parse(
[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel],
$level))
$contentSvc.DeveloperDashboardSettings.Update()
Write-Host("Current Level: " +
$contentSvc.DeveloperDashboardSettings.DisplayLevel)
“On”: Activate the Developer Dashboard
“Off”: Deactivate
On and Off are Case Sensitive.
SharePoint Request Pipeline
Application Pool
 The application pool was introduced with IIS 6 to allow the
complete isolation of applications from each other. This
means that IIS is able to completely separate things
happening in one application from those in another.
Keeping applications together in one pool can still make
sense, because another pool creates its own worker process,
and will use more resources.
 Separate applications make the web server more reliable. If
one application hangs, consumes too much CPU time, or
behaves unpredictably, it affects its entire pool. Other
application pools (and the applications within them) will
continue to run. In addition, the application pools are
highly configurable.
Data Base in Sharepoint
GHOSTING AND UNGHOSTING
 In SharePoint, most of the site pages derive from templates. The custom pages only
store the difference between the custom page and the associated template. The
template is loaded in memory and applied to the custom pages on the fly. Holding
the template in the memory is like having it in a cache. This adds performance and
flexibility. The flexibility is achieved when you change the template page—all the
associated custom pages are updated with the new appearance. Custom pages are
loaded from the file system. Such pages are called ghosted pages.
 When page data is loaded from the content database, it's called an unghosted page.
That's normally the default way you treat custom pages. Internally, the unghosted
pages are supported by two tables. The page requires an entry in the document table
because pages are elements within a document library. The content table contains
the actual source code of the ASPX page required to execute the page.
 When a page is requested, SharePoint first checks in the document table and then
goes to the content table to load the page. If it does not find data for the page, it
goes to the file directory to load the page. This entire page-loading process is
performed by the ASP.NET runtime using the SPVirtualPathProvider mentioned
earlier. This ensures flexible access as well as full control over the loading
procedure.
SPList
SPField
%ProgramFiles%Common FilesMicrosoft Sharedweb server
extensions14TEMPLATEXML
Web Part
 Create Visual Web Parts for SharePoint 2010
1. Start Visual Studio 2010, click File, point to New, and then click Project.
2. Navigate to the Visual C# node in the Installed Templates section, click SharePoint, and
then click 2010.
3. Select the Visual Web Part project template, provide a name, a location for your project,
and then click OK.
4. Select the Deploy as a farm solution option and then click Finish.
5. Check Features and Package
6. Add a Label and Button, write button click event.
7. Deploy web part.
8. Add Web part in a any page.
9. Attach Debugger.
SharePoint 2010 Development
 Open Visual Studio 201o
 Create a blank SharePoint 2010 Solution.
 Create a Sample Visual WebPart and Check Properties
F4
 Deploy Web part.
 Show how to add new item to a project.
 Show WSP file.
 Deploy using VS 2010.
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using System.Web;
using System.Data;
using Microsoft.SharePoint.Administration;
namespace Group.VisualWebPart1
{
public partial class VisualWebPart1UserControl : UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
DataTable table = new DataTable();
table.Columns.Add("Site", typeof(string));
table.Columns.Add("Web", typeof(string));
table.Columns.Add("List", typeof(string));
table.Columns.Add("ItemURL", typeof(string));
table.Columns.Add("ItemTitle", typeof(string));
table.Columns.Add("Size", typeof(string));
#region Only Root Web
SPSecurity.RunWithElevatedPrivileges(delegate
{
SPSiteCollection siteCollections = SPContext.Current.Web.Site.WebApplication.Sites; //oSPWeb.WebApplication.Sites;
foreach (SPSite objSPSite in siteCollections)
{
SPWeb objSPWeb = objSPSite.RootWeb;
//Shared Documents should be available in all sites including sub sites.
SPList spDocument = objSPWeb.Lists["News"];
foreach (SPListItem objItem in spDocument.Items)
{
try
{
//table.Rows.Add(objSPSite.Url, objSPWeb.Title, spDocument.Title, objItem.Url, objItem.Title, objItem.File.Length);
table.Rows.Add(objSPSite.Url, objSPWeb.Title, spDocument.Title, objItem.Title);
}
catch (Exception ec) { }
}
objSPWeb.Close();
}
});
#endregion
#region All Sites
//SPSecurity.RunWithElevatedPrivileges(delegate
//{
// SPSiteCollection siteCollections = SPContext.Current.Web.Site.WebApplication.Sites; //oSPWeb.WebApplication.Sites;
News WebPart
Simple Visual Web Part
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
namespace VisualWebPartDashboard.VisualWebPart1
{
public partial class VisualWebPart1UserControl : UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
using (SPMonitoredScope scope = new SPMonitoredScope(this.GetType().Name))
{
Button b = new Button();
b.Text = "Click me!";
Controls.Add(b);
using (SPMonitoredScope scopeInner = new SPMonitoredScope("Inner Scope"))
{
System.Threading.Thread.Sleep(5); // lengthy operation
}
}
}
}
}
Chapter 6.
Using Fiddler to Understand What's Going on the Wire
Q & A

Mais conteúdo relacionado

Mais procurados

SharePoint BCS, OK. But what is the SharePoint Business Data List Connector (...
SharePoint BCS, OK. But what is the SharePoint Business Data List Connector (...SharePoint BCS, OK. But what is the SharePoint Business Data List Connector (...
SharePoint BCS, OK. But what is the SharePoint Business Data List Connector (...Layer2
 
SharePoint Branding Guidance @ SharePoint Saturday Redmond
SharePoint Branding Guidance @ SharePoint Saturday RedmondSharePoint Branding Guidance @ SharePoint Saturday Redmond
SharePoint Branding Guidance @ SharePoint Saturday RedmondKanwal Khipple
 
Advanced SharePoint Server Concepts
Advanced SharePoint Server ConceptsAdvanced SharePoint Server Concepts
Advanced SharePoint Server ConceptsLearning SharePoint
 
Workflow Manager Tips & Tricks
Workflow Manager Tips & TricksWorkflow Manager Tips & Tricks
Workflow Manager Tips & TricksMai Omar Desouki
 
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?BIWUG 01/09/2005 IW Technologies, what's to come in 2006?
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?BIWUG
 
10 razones para pasarse a SharePoint 2010
10 razones para pasarse a SharePoint 201010 razones para pasarse a SharePoint 2010
10 razones para pasarse a SharePoint 2010Raona
 
SharePoint 2010 Team Site Overview
SharePoint 2010 Team Site OverviewSharePoint 2010 Team Site Overview
SharePoint 2010 Team Site OverviewIvor Davies
 
Peter Ward: The True Power of SharePoint Designer Workflows
Peter Ward: The True Power of SharePoint Designer WorkflowsPeter Ward: The True Power of SharePoint Designer Workflows
Peter Ward: The True Power of SharePoint Designer WorkflowsSharePoint Saturday NY
 
Comparison of SharePoint 2010 and SharePoint 2013
Comparison of SharePoint 2010 and SharePoint 2013Comparison of SharePoint 2010 and SharePoint 2013
Comparison of SharePoint 2010 and SharePoint 2013Ian Woodgate
 
SharePoint Document Sets
SharePoint Document SetsSharePoint Document Sets
SharePoint Document SetsRegroove
 
Share point 2010_installation_topologies-day 2
Share point 2010_installation_topologies-day 2Share point 2010_installation_topologies-day 2
Share point 2010_installation_topologies-day 2Narayana Reddy
 
How to implement SharePoint in your organization
How to implement SharePoint in your organizationHow to implement SharePoint in your organization
How to implement SharePoint in your organizationSPC Adriatics
 
Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013Vishal Pawar
 
Going offline with share point workspace
Going offline with share point workspaceGoing offline with share point workspace
Going offline with share point workspaceJoshua Haebets
 
Sharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra usSharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra usQUONTRASOLUTIONS
 
( 2 ) Office 2007 Create A Portal
( 2 ) Office 2007   Create A Portal( 2 ) Office 2007   Create A Portal
( 2 ) Office 2007 Create A PortalLiquidHub
 
Advanced SharePoint 2010 Features
Advanced SharePoint 2010 FeaturesAdvanced SharePoint 2010 Features
Advanced SharePoint 2010 FeaturesIvor Davies
 
SharePoint 2010 Upgrade Drill Down
SharePoint 2010 Upgrade Drill DownSharePoint 2010 Upgrade Drill Down
SharePoint 2010 Upgrade Drill DownJoel Oleson
 

Mais procurados (20)

SharePoint BCS, OK. But what is the SharePoint Business Data List Connector (...
SharePoint BCS, OK. But what is the SharePoint Business Data List Connector (...SharePoint BCS, OK. But what is the SharePoint Business Data List Connector (...
SharePoint BCS, OK. But what is the SharePoint Business Data List Connector (...
 
SharePoint 101
SharePoint 101SharePoint 101
SharePoint 101
 
SharePoint Branding Guidance @ SharePoint Saturday Redmond
SharePoint Branding Guidance @ SharePoint Saturday RedmondSharePoint Branding Guidance @ SharePoint Saturday Redmond
SharePoint Branding Guidance @ SharePoint Saturday Redmond
 
Advanced SharePoint Server Concepts
Advanced SharePoint Server ConceptsAdvanced SharePoint Server Concepts
Advanced SharePoint Server Concepts
 
Workflow Manager Tips & Tricks
Workflow Manager Tips & TricksWorkflow Manager Tips & Tricks
Workflow Manager Tips & Tricks
 
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?BIWUG 01/09/2005 IW Technologies, what's to come in 2006?
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?
 
10 razones para pasarse a SharePoint 2010
10 razones para pasarse a SharePoint 201010 razones para pasarse a SharePoint 2010
10 razones para pasarse a SharePoint 2010
 
SharePoint 2010 Team Site Overview
SharePoint 2010 Team Site OverviewSharePoint 2010 Team Site Overview
SharePoint 2010 Team Site Overview
 
Peter Ward: The True Power of SharePoint Designer Workflows
Peter Ward: The True Power of SharePoint Designer WorkflowsPeter Ward: The True Power of SharePoint Designer Workflows
Peter Ward: The True Power of SharePoint Designer Workflows
 
SharePoint Tools Concepts
SharePoint Tools ConceptsSharePoint Tools Concepts
SharePoint Tools Concepts
 
Comparison of SharePoint 2010 and SharePoint 2013
Comparison of SharePoint 2010 and SharePoint 2013Comparison of SharePoint 2010 and SharePoint 2013
Comparison of SharePoint 2010 and SharePoint 2013
 
SharePoint Document Sets
SharePoint Document SetsSharePoint Document Sets
SharePoint Document Sets
 
Share point 2010_installation_topologies-day 2
Share point 2010_installation_topologies-day 2Share point 2010_installation_topologies-day 2
Share point 2010_installation_topologies-day 2
 
How to implement SharePoint in your organization
How to implement SharePoint in your organizationHow to implement SharePoint in your organization
How to implement SharePoint in your organization
 
Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013
 
Going offline with share point workspace
Going offline with share point workspaceGoing offline with share point workspace
Going offline with share point workspace
 
Sharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra usSharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra us
 
( 2 ) Office 2007 Create A Portal
( 2 ) Office 2007   Create A Portal( 2 ) Office 2007   Create A Portal
( 2 ) Office 2007 Create A Portal
 
Advanced SharePoint 2010 Features
Advanced SharePoint 2010 FeaturesAdvanced SharePoint 2010 Features
Advanced SharePoint 2010 Features
 
SharePoint 2010 Upgrade Drill Down
SharePoint 2010 Upgrade Drill DownSharePoint 2010 Upgrade Drill Down
SharePoint 2010 Upgrade Drill Down
 

Destaque (7)

Edocr Mashup
Edocr   MashupEdocr   Mashup
Edocr Mashup
 
Petra
PetraPetra
Petra
 
ローカルリポジトリのススメ
ローカルリポジトリのススメローカルリポジトリのススメ
ローカルリポジトリのススメ
 
164
164164
164
 
Stephen May
Stephen MayStephen May
Stephen May
 
RRHH Reklut Empleos (4)
RRHH Reklut Empleos (4)RRHH Reklut Empleos (4)
RRHH Reklut Empleos (4)
 
Bb7
Bb7Bb7
Bb7
 

Semelhante a Share point 2010_overview-day4-code

Monitoring, troubleshooting,
Monitoring, troubleshooting,Monitoring, troubleshooting,
Monitoring, troubleshooting,aspnet123
 
SharePoint Object Model, Web Services and Events
SharePoint Object Model, Web Services and EventsSharePoint Object Model, Web Services and Events
SharePoint Object Model, Web Services and EventsMohan Arumugam
 
.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7aminmesbahi
 
SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewRob Windsor
 
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...Ivan Sanders
 
Best Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsBest Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsAlexander Meijers
 
Migrating to SharePoint 2013 - Business and Technical Perspective
Migrating to SharePoint 2013 - Business and Technical PerspectiveMigrating to SharePoint 2013 - Business and Technical Perspective
Migrating to SharePoint 2013 - Business and Technical PerspectiveJohn Calvert
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1Neeraj Mathur
 
Getting Started with Iron Speed Designer
Getting Started with Iron Speed DesignerGetting Started with Iron Speed Designer
Getting Started with Iron Speed DesignerIron Speed
 
SharePoint Development (Lesson 3)
SharePoint Development (Lesson 3)SharePoint Development (Lesson 3)
SharePoint Development (Lesson 3)MJ Ferdous
 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...SPTechCon
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questionsAkhil Mittal
 
SPSNYC SharePoint Worst Practices
SPSNYC SharePoint Worst PracticesSPSNYC SharePoint Worst Practices
SPSNYC SharePoint Worst PracticesScott Hoag
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express pptAbhinaw Kumar
 

Semelhante a Share point 2010_overview-day4-code (20)

Monitoring, troubleshooting,
Monitoring, troubleshooting,Monitoring, troubleshooting,
Monitoring, troubleshooting,
 
DEVICE CHANNELS
DEVICE CHANNELSDEVICE CHANNELS
DEVICE CHANNELS
 
SharePoint Object Model, Web Services and Events
SharePoint Object Model, Web Services and EventsSharePoint Object Model, Web Services and Events
SharePoint Object Model, Web Services and Events
 
.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7
 
SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development Overview
 
A View about ASP .NET and their objectives
A View about ASP .NET and their objectivesA View about ASP .NET and their objectives
A View about ASP .NET and their objectives
 
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
 
Team lab install_en
Team lab install_enTeam lab install_en
Team lab install_en
 
Best Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsBest Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point Solutions
 
Migrating to SharePoint 2013 - Business and Technical Perspective
Migrating to SharePoint 2013 - Business and Technical PerspectiveMigrating to SharePoint 2013 - Business and Technical Perspective
Migrating to SharePoint 2013 - Business and Technical Perspective
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
Getting Started with Iron Speed Designer
Getting Started with Iron Speed DesignerGetting Started with Iron Speed Designer
Getting Started with Iron Speed Designer
 
SharePoint Development (Lesson 3)
SharePoint Development (Lesson 3)SharePoint Development (Lesson 3)
SharePoint Development (Lesson 3)
 
ASP.NET - Web Programming
ASP.NET - Web ProgrammingASP.NET - Web Programming
ASP.NET - Web Programming
 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questions
 
Creating web form
Creating web formCreating web form
Creating web form
 
Creating web form
Creating web formCreating web form
Creating web form
 
SPSNYC SharePoint Worst Practices
SPSNYC SharePoint Worst PracticesSPSNYC SharePoint Worst Practices
SPSNYC SharePoint Worst Practices
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express ppt
 

Último

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Share point 2010_overview-day4-code

  • 2. Agenda • Architecture • Client Installation • Debugging the Server • Web Parts • Application pages • Custom fields • Controls • Questions
  • 4. SharePoint 2010 Client Installation Start with the SharePoint.exe file for SharePoint Foundation or SharePoint Server 2010. Extract the files from SharePoint.exe with the following command line. A user account control (UAC) prompt might appear at this point. SharePoint.exe /extract:c:SharePointFiles This extracts all of the installation files to your hard drive. Use a folder you can recognize easily later, such as c:SharePointFiles. This allows you to repeat the installation steps without extracting the package again and enables access to the configuration file that needs tweaking, to permit installation on Windows Vista or Windows 7: c:SharePointFilesFilesSetupconfig.xml Add the following line to the end of the config.xml file: <Setting Id="AllowWindowsClientInstall" Value="True"/> The complete file should now look like this: <Configuration> <Package Id="sts"> <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" /> </Package> <DATADIR Value="%CommonProgramFiles%Microsoft SharedXWeb Server Extensions14Data" /> <Logging Type="verbose" Path="%temp%" Template="Microsoft Windows SharePoint Services 4.0 Setup *.log" /> <Setting Id="UsingUIInstallMode" Value="1" /> <Setting Id="SETUP_REBOOT" Value="Never" /> <Setting Id="AllowWindowsClientInstall" Value="True"/> </Configuration>
  • 5. Debugging the Server  A web application consists of several parts. IIS plays a significant role—each request and response passes through IIS. Debugging the server includes a way to debug IIS to see what data is transmitted from the browser to the server and back. Despite debugging, performance issues often arise. To test your SharePoint application under load, a stress test tool is essential.  If your SharePoint server does not respond as expected and the debugger does not reveal useful results—probably because an internal module beyond your access scope fails—you need more tools. SharePoint hides error message and replaces stack traces, exception messages, and logs with almost useless information. It's primarily designed for end users, and they might get frightened when a NullReferenceException is displayed (e.g., "Did I lose all my data now?"). In your development environment, you can turn on developer-friendly (and therefore user- unfriendly) error messages by setting the appropriate parameters in the web.config file:<configuration> <SharePoint> <SafeMode CallStack="true" ... /> ... </SharePoint> <system.web> <customErrors mode="off" /> ... </system.web> </configuration>
  • 6. How to Check Errors  Look into the event log for SharePoint.  Look into the SharePoint logs.  Attach a debugger to the working process and watch for exceptions.  Look into the IIS logs.  Add tracing to your code and watch the traces.  Consider remote debugging if the target machine has no debugger installed.  Let's consider each of these alternatives in more detail.  Looking into the Event Log for SharePoin
  • 7.  Looking into the SharePoint and IIS Logs SharePoint itself writes a lot of data into the logs if it is enabled in Central Administration. During the development and test cycle, we strongly recommend activating the logs. You can find the logging files in <%CommonProgramFiles%>Microsoft SharedWeb Server Extensions14L0GS  The IIS logs are found here: <%SystemRoot%>System32LogFiles Ex:(C:WindowsSystem32LogFiles) The IIS logs contain information about each request and the response. If you match certain reactions of SharePoint with the event of a specific request, there is a good chance of Unding the reason for some unexpected behavior. If you suspect that your code is causing the miss-behaviour and the debugger disturbs the data flow, a private trace is a good option. Just write useful information from your code to a trace provider. You can turn tracing on and off by setting the appropriate options in the application's web.config file: <configuration> <system.web> <trace enabled="true" requestLimit="40" localOnly="false"/> </system.web> </configuration> t
  • 8. Activate the Developer Dashboard $level="On" [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoi nt") [void][System.Reflection.Assembly]::LoadWithPartialName ("Microsoft.SharePoint.Administration") $contentSvc=[Microsoft.SharePoint.Administration.SPWebService]::ContentSer vice $contentSvc.DeveloperDashboardSettings.DisplayLevel= ([Enum]::Parse( [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel], $level)) $contentSvc.DeveloperDashboardSettings.Update() Write-Host("Current Level: " + $contentSvc.DeveloperDashboardSettings.DisplayLevel) “On”: Activate the Developer Dashboard “Off”: Deactivate On and Off are Case Sensitive.
  • 9.
  • 11. Application Pool  The application pool was introduced with IIS 6 to allow the complete isolation of applications from each other. This means that IIS is able to completely separate things happening in one application from those in another. Keeping applications together in one pool can still make sense, because another pool creates its own worker process, and will use more resources.  Separate applications make the web server more reliable. If one application hangs, consumes too much CPU time, or behaves unpredictably, it affects its entire pool. Other application pools (and the applications within them) will continue to run. In addition, the application pools are highly configurable.
  • 12. Data Base in Sharepoint
  • 13. GHOSTING AND UNGHOSTING  In SharePoint, most of the site pages derive from templates. The custom pages only store the difference between the custom page and the associated template. The template is loaded in memory and applied to the custom pages on the fly. Holding the template in the memory is like having it in a cache. This adds performance and flexibility. The flexibility is achieved when you change the template page—all the associated custom pages are updated with the new appearance. Custom pages are loaded from the file system. Such pages are called ghosted pages.  When page data is loaded from the content database, it's called an unghosted page. That's normally the default way you treat custom pages. Internally, the unghosted pages are supported by two tables. The page requires an entry in the document table because pages are elements within a document library. The content table contains the actual source code of the ASPX page required to execute the page.  When a page is requested, SharePoint first checks in the document table and then goes to the content table to load the page. If it does not find data for the page, it goes to the file directory to load the page. This entire page-loading process is performed by the ASP.NET runtime using the SPVirtualPathProvider mentioned earlier. This ensures flexible access as well as full control over the loading procedure.
  • 16. Web Part  Create Visual Web Parts for SharePoint 2010 1. Start Visual Studio 2010, click File, point to New, and then click Project. 2. Navigate to the Visual C# node in the Installed Templates section, click SharePoint, and then click 2010. 3. Select the Visual Web Part project template, provide a name, a location for your project, and then click OK. 4. Select the Deploy as a farm solution option and then click Finish. 5. Check Features and Package 6. Add a Label and Button, write button click event. 7. Deploy web part. 8. Add Web part in a any page. 9. Attach Debugger.
  • 17. SharePoint 2010 Development  Open Visual Studio 201o  Create a blank SharePoint 2010 Solution.  Create a Sample Visual WebPart and Check Properties F4  Deploy Web part.  Show how to add new item to a project.  Show WSP file.  Deploy using VS 2010.
  • 18. using System; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using Microsoft.SharePoint; using Microsoft.SharePoint.Utilities; using System.Web; using System.Data; using Microsoft.SharePoint.Administration; namespace Group.VisualWebPart1 { public partial class VisualWebPart1UserControl : UserControl { protected void Page_Load(object sender, EventArgs e) { DataTable table = new DataTable(); table.Columns.Add("Site", typeof(string)); table.Columns.Add("Web", typeof(string)); table.Columns.Add("List", typeof(string)); table.Columns.Add("ItemURL", typeof(string)); table.Columns.Add("ItemTitle", typeof(string)); table.Columns.Add("Size", typeof(string)); #region Only Root Web SPSecurity.RunWithElevatedPrivileges(delegate { SPSiteCollection siteCollections = SPContext.Current.Web.Site.WebApplication.Sites; //oSPWeb.WebApplication.Sites; foreach (SPSite objSPSite in siteCollections) { SPWeb objSPWeb = objSPSite.RootWeb; //Shared Documents should be available in all sites including sub sites. SPList spDocument = objSPWeb.Lists["News"]; foreach (SPListItem objItem in spDocument.Items) { try { //table.Rows.Add(objSPSite.Url, objSPWeb.Title, spDocument.Title, objItem.Url, objItem.Title, objItem.File.Length); table.Rows.Add(objSPSite.Url, objSPWeb.Title, spDocument.Title, objItem.Title); } catch (Exception ec) { } } objSPWeb.Close(); } }); #endregion #region All Sites //SPSecurity.RunWithElevatedPrivileges(delegate //{ // SPSiteCollection siteCollections = SPContext.Current.Web.Site.WebApplication.Sites; //oSPWeb.WebApplication.Sites; News WebPart
  • 19. Simple Visual Web Part using System; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using Microsoft.SharePoint; using Microsoft.SharePoint.Utilities; namespace VisualWebPartDashboard.VisualWebPart1 { public partial class VisualWebPart1UserControl : UserControl { protected void Page_Load(object sender, EventArgs e) { using (SPMonitoredScope scope = new SPMonitoredScope(this.GetType().Name)) { Button b = new Button(); b.Text = "Click me!"; Controls.Add(b); using (SPMonitoredScope scopeInner = new SPMonitoredScope("Inner Scope")) { System.Threading.Thread.Sleep(5); // lengthy operation } } } } } Chapter 6. Using Fiddler to Understand What's Going on the Wire
  • 20. Q & A