Download Module 14 - SharePoint Practice

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Microsoft
Course
MicrosoftOfficial
SharePoint
2013
®
Monitoring and Troubleshooting
Custom SharePoint Solutions
SharePoint Practice
Module Overview
• Debugging SharePoint Apps in Visual Studio
• Diagnosing Faults in Deployed Apps
• Testing Performance and Scalability
Lesson 1: Debugging SharePoint Apps in Visual
Studio
• Configuring a SharePoint Site for Debugging
• Debugging JavaScript Code
• Demonstration: Debugging JavaScript in Visual
Studio and Internet Explorer
• Debugging REST Calls
• Debugging Remote Events
Configuring a SharePoint Site for Debugging
• Debugging Tools in Visual Studio
• Output
• Immediates
• Call Stack
• IntelliTrace
• Enabling Debugging in Web.config
• Developer Site Collection Template
• Enabling the Developer Site Collection Feature
Debugging JavaScript Code
• Minimized and Debugging JavaScript Files
• Visual Studio JavaScript Debugging
• Internet Explorer JavaScript Debugging
Demonstration: Debugging JavaScript in Visual
Studio and Internet Explorer
In this demonstration, you will see how to:
• Use the Visual Studio Debugger to debug
JavaScript in a SharePoint app.
• Use the Internet Explorer F12 Developer tools to
profile the functions called in a web page.
Debugging REST Calls
• Using the JavaScript CSOM reference to
understand REST properties
• Checking data in Internet Explorer
• Using the Fiddler Web Debugger
Debugging Remote Events
• Developing Apps Using Remote SharePoint
Servers
• Remote Event Receivers and Remote SharePoint
Servers
•
Locating the WCF service for a remote event receiver
• Debugging Remote Event Receivers
• Windows Azure Service Bus
• Configuring a SharePoint app project to use a service
bus
Lesson 2: Diagnosing Faults in Deployed Apps
• Logging Errors in the App Monitoring Page
• IIS Tracing
• Using NuGet Logging Packages
Logging Errors in the App Monitoring Page
• Recording a custom error:
try
{
//Place the operation that may cause an exception
//in a try block
}
catch (Exception e)
{
SP.Utilities.Utility.logCustomAppError(context,
"The operation caused an exception. “ +
“The details were: "
+ e.Message);
}
IIS Tracing
Building Diagnostic Tools:
1. Configure tracing in web.config
•
Ensure tracing is disabled by default.
2. Provide a user interface element to enable
tracing
•
Remember to provide a similar element to disable
tracing after diagnostic information has been
gathered.
3. Provide a link to trace.axd
•
Users can forward the trace information to you.
Using NuGet Logging Packages
• NuGet Package Manager
• ELMAH
• MiniProfiler
Lesson 3: Testing Performance and Scalability
• SharePoint App Boundary and Supported Limits
• Performance Testing Tools
• Profiling an App
• Stress Testing Apps
• Discussion: Choosing a Performance Tool
SharePoint App Boundary and Supported Limits
Limit
Number of apps in the
Manage Licenses page
Number of app Licenses
in a single tenancy
Number of apps
displayed in the Add an
App page
Number of managers for
each app license
Number of app licenses
that a single user can
view
Number of apps that a
user can see in the
corporate catalog
Type
Boundary
Maximum Value
2,000
Supported
1,000,000
Boundary
240
Boundary
30
Boundary
2,000
Boundary
500
Performance Testing Tools
• Internet Explorer Developer Tools
• Profiler
• Network
• Fiddler
• The Statistics tab
• Custom Rules
• The Timeline
• Performance Tools in Visual Studio
• Profiling Tools
• Web Performance and Load Tests
Profiling an App
• Performance Issues
• Hotspots, bottlenecks, unintended calls.
• Profiling Methods
• Sampling
• Instrumentation
• Concurrency
• .NET Memory
• Tier Interaction
• Profiling Process
• Configuring a profiling session
• Running a profiling session
• Analyzing results in Performance Explorer
Stress Testing Apps
• Stress Testing Process
1. Record web performance tests
2. Configure a load test
3. Execute a load test
4. Analyze load test results
• Handling Dynamic Parameters
• Validation and Extraction Rules
Discussion: Choosing a Performance Tool
Discuss the following scenarios with the class:
• Preparation for Deployment
• Identification of a Bug
• Optimization of a Procedure
Lab: Enabling ASP.NET Tracing
• Exercise 1: Adding a Diagnostics Page to a
SharePoint App
• Exercise 2: Configuring ASP.NET Tracing
• Exercise 3: Using Trace Logs
Lab Scenario
Occasional page errors in the Mileage Recorder
app have proved difficult to replicate and fix in the
development environment. You have been asked
to enable ASP.NET tracing to ensure that users can
generate more diagnostic information when
problems arise.
Lab Review
• In Exercise 2, Task 1, you added a new <trace>
element to the web.config file with the enabled
attribute set to false. Why is it necessary to create
this element, when code in the ToggleTracing
action sets the enabled attribute to true?
• What are the consequences of leaving tracing
enabled after you have diagnosed a bug?
Module Review and Takeaways
• Review Question(s)
• Best Practice
• Common Issues and Troubleshooting Tips
Course Evaluation