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

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 101
SharePoint 101SharePoint 101
SharePoint 101
Dux Raymond Sy
 
SharePoint Branding Guidance @ SharePoint Saturday Redmond
SharePoint Branding Guidance @ SharePoint Saturday RedmondSharePoint Branding Guidance @ SharePoint Saturday Redmond
SharePoint Branding Guidance @ SharePoint Saturday Redmond
Kanwal Khipple
 
Advanced SharePoint Server Concepts
Advanced SharePoint Server ConceptsAdvanced SharePoint Server Concepts
Advanced SharePoint Server Concepts
Learning SharePoint
 
Workflow Manager Tips & Tricks
Workflow Manager Tips & TricksWorkflow Manager Tips & Tricks
Workflow Manager Tips & Tricks
Mai 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 2010
Raona
 
SharePoint 2010 Team Site Overview
SharePoint 2010 Team Site OverviewSharePoint 2010 Team Site Overview
SharePoint 2010 Team Site Overview
Ivor 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 Workflows
SharePoint Saturday NY
 
SharePoint Tools Concepts
SharePoint Tools ConceptsSharePoint Tools Concepts
SharePoint Tools Concepts
Learning SharePoint
 
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
Ian 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 organization
SPC Adriatics
 
Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013
Vishal Pawar
 
Going offline with share point workspace
Going offline with share point workspaceGoing offline with share point workspace
Going offline with share point workspace
Joshua Haebets
 
Sharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra usSharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra us
QUONTRASOLUTIONS
 
( 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 Down
Joel Oleson
 

What's hot (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
 

Viewers also liked

ローカルリポジトリのススメ
ローカルリポジトリのススメローカルリポジトリのススメ
ローカルリポジトリのススメ
TAKEMURA Takayuki
 
RRHH Reklut Empleos (4)
RRHH Reklut Empleos (4)RRHH Reklut Empleos (4)
RRHH Reklut Empleos (4)
María Agustina Sánchez
 

Viewers also liked (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
 

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 Events
Mohan 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 7
aminmesbahi
 
SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewRob Windsor
 
A View about ASP .NET and their objectives
A View about ASP .NET and their objectivesA 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...
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 Solutions
Alexander 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 Perspective
John 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 Designer
Iron 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 questions
Akhil Mittal
 
Creating web form
Creating web formCreating web form
Creating web form
mentorrbuddy
 
Creating web form
Creating web formCreating web form
Creating web form
mentorrbuddy
 
SPSNYC SharePoint Worst Practices
SPSNYC SharePoint Worst PracticesSPSNYC SharePoint Worst Practices
SPSNYC SharePoint Worst Practices
Scott 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

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 

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