SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Advanced SharePoint Server Concepts
Advanced SharePoint Server ConceptsAdvanced SharePoint Server Concepts
Advanced SharePoint Server ConceptsLearning SharePoint
 
( 2 ) Office 2007 Create A Portal
( 2 ) Office 2007   Create A Portal( 2 ) Office 2007   Create A Portal
( 2 ) Office 2007 Create A PortalLiquidHub
 
.Net course-in-mumbai-ppt
.Net course-in-mumbai-ppt.Net course-in-mumbai-ppt
.Net course-in-mumbai-pptvibrantuser
 
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 designer workflow by quontra us
Sharepoint designer workflow by quontra usSharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra usQUONTRASOLUTIONS
 
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
 
Fast search 2010 for SharePoint 2010 Installation and Configuration
Fast search 2010 for SharePoint 2010 Installation and ConfigurationFast search 2010 for SharePoint 2010 Installation and Configuration
Fast search 2010 for SharePoint 2010 Installation and ConfigurationAhmed Madany
 
Share point 2010_overview-day 1
Share point 2010_overview-day 1Share point 2010_overview-day 1
Share point 2010_overview-day 1Narayana Reddy
 
5 Mysterious SharePoint Errors and Their Resolution
5 Mysterious SharePoint Errors and Their Resolution5 Mysterious SharePoint Errors and Their Resolution
5 Mysterious SharePoint Errors and Their Resolutionharry marweik
 
Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013Randy Williams
 
SharePoint 2010 Team Site Overview
SharePoint 2010 Team Site OverviewSharePoint 2010 Team Site Overview
SharePoint 2010 Team Site OverviewIvor Davies
 
SharePoint 2010 Upgrade Drill Down
SharePoint 2010 Upgrade Drill DownSharePoint 2010 Upgrade Drill Down
SharePoint 2010 Upgrade Drill DownJoel Oleson
 
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsAn IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsRandy Williams
 
SharePoint 2013 for Administrators and IT Pro's
SharePoint 2013 for Administrators and IT Pro'sSharePoint 2013 for Administrators and IT Pro's
SharePoint 2013 for Administrators and IT Pro'sLearning SharePoint
 
Workflow Manager Tips & Tricks
Workflow Manager Tips & TricksWorkflow Manager Tips & Tricks
Workflow Manager Tips & TricksMai Omar Desouki
 
SharePoint Branding Guidance @ SharePoint Saturday Redmond
SharePoint Branding Guidance @ SharePoint Saturday RedmondSharePoint Branding Guidance @ SharePoint Saturday Redmond
SharePoint Branding Guidance @ SharePoint Saturday RedmondKanwal Khipple
 
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...Joel Oleson
 

What's hot (20)

Advanced SharePoint Server Concepts
Advanced SharePoint Server ConceptsAdvanced SharePoint Server Concepts
Advanced SharePoint Server Concepts
 
( 2 ) Office 2007 Create A Portal
( 2 ) Office 2007   Create A Portal( 2 ) Office 2007   Create A Portal
( 2 ) Office 2007 Create A Portal
 
.Net course-in-mumbai-ppt
.Net course-in-mumbai-ppt.Net course-in-mumbai-ppt
.Net course-in-mumbai-ppt
 
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 Tools Concepts
SharePoint Tools ConceptsSharePoint Tools Concepts
SharePoint Tools Concepts
 
Sharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra usSharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra us
 
SharePoint 101
SharePoint 101SharePoint 101
SharePoint 101
 
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
 
Fast search 2010 for SharePoint 2010 Installation and Configuration
Fast search 2010 for SharePoint 2010 Installation and ConfigurationFast search 2010 for SharePoint 2010 Installation and Configuration
Fast search 2010 for SharePoint 2010 Installation and Configuration
 
Share point 2010_overview-day 1
Share point 2010_overview-day 1Share point 2010_overview-day 1
Share point 2010_overview-day 1
 
5 Mysterious SharePoint Errors and Their Resolution
5 Mysterious SharePoint Errors and Their Resolution5 Mysterious SharePoint Errors and Their Resolution
5 Mysterious SharePoint Errors and Their Resolution
 
Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013
 
SharePoint 2010 Team Site Overview
SharePoint 2010 Team Site OverviewSharePoint 2010 Team Site Overview
SharePoint 2010 Team Site Overview
 
SharePoint 2010 Upgrade Drill Down
SharePoint 2010 Upgrade Drill DownSharePoint 2010 Upgrade Drill Down
SharePoint 2010 Upgrade Drill Down
 
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsAn IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
 
SharePoint 2013 for Administrators and IT Pro's
SharePoint 2013 for Administrators and IT Pro'sSharePoint 2013 for Administrators and IT Pro's
SharePoint 2013 for Administrators and IT Pro's
 
Walkthrough asp.net
Walkthrough asp.netWalkthrough asp.net
Walkthrough asp.net
 
Workflow Manager Tips & Tricks
Workflow Manager Tips & TricksWorkflow Manager Tips & Tricks
Workflow Manager Tips & Tricks
 
SharePoint Branding Guidance @ SharePoint Saturday Redmond
SharePoint Branding Guidance @ SharePoint Saturday RedmondSharePoint Branding Guidance @ SharePoint Saturday Redmond
SharePoint Branding Guidance @ SharePoint Saturday Redmond
 
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
 

Similar to 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
 

Similar to 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
 

Recently uploaded

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - 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