Showing posts with label Fiddler. Show all posts
Showing posts with label Fiddler. Show all posts

Monday 5 June 2017

Enforcing Authentication using the Windows IdP

Overview: SharePoint farms often have multiple Identity Providers (IdP) such as Ping or SiteMinder and you always need to have Windows for the Search and other reasons.  Often you need to force the browser or CSOM code to use a specific IdP, in my case, the Windows IdP needs to be used.

In Fiddler, I have added a header as shown below to enforce the browser uses the Windows IdP:


CSOM HTTP Header added to force usage of the Windows IdP:

Simple Code for a CSOM SharePoint Test Rig



Sunday 27 November 2016

Web Service/WebAPI test tools


  1. https://www.getpostman.com
  2. https://insomnia.rest
  3. http://www.telerik.com/fiddler (if you are pretty advanced)
  4. BURP
  5. IE or Chrome Developer Tools
  6. FireFox plus addins

Postman
Azure Power Platform has custom connector testing tool which is fantasic if you are on the platform.


Sunday 20 March 2016

Hacking SharePoint input field Validation


Problem: Here is an easy way to step around SharePoint 2013's input field validation for a drop down list.  Any list contains a drop-down list (configured to only allowed to chose values from the drop down list), using Internet Explorer (IE) developer tools and amending the DOM, when posting the form, the change value is inserted into the list.
Replication Steps:
  1. Open IE go to the list to add a new list item (the list must have a drop down field column), hit Fn+F12 to open the IE Dev toolbar.
  2. In the "DOM Explorer" tab select the "Select element" icon (top left).
  3. Click on the drop down control i.e. "Primary/Secondary" input control as shown below.
  4. Edit the DOM value for the item selected to some crazy text and save the form.
  5. Open the item in view mode and you will see the crazy data as shown below circled in red in the bottom picture.  


Wednesday 23 October 2013

Performance Testing SharePoint 2013

Performance can be broken down into many aspects, in this post I examine my approach to verifying SP performance.

Added 2021: Breakdown for types of testing used for a SaaS solution setup on Azure PaaS.




Added 2015: Marcel De Vries Performance Testing Session at Dev Intersections Conference Amsterdam 2015
Marcel De Vries breaks it down into 4 forms of Performance Testing:
  • Performance Testing
  • Load Testing
  • Stress Testing
  • Capacity Planning
Note: Baseline each test type so that these can be compared to deployed solutions or application.

Fiddler:  I create a publishing site and use fiddler from as close to the server with a minor adjustment so I can easily see the TTL.  You need Fiddler and make this adjustment (alternatively you can see this in the page response anyway).  This tells me how quickly my page is being returned, you can also use this to prove if network connectivity is your issue.  For instance a remote site in Asia regardless of request may have poor connectivity.

PageSpeed Insights:  This is a Google service to check the speed of your public website and provides a nice summary of items you can optimise.

Developer Dashboard: Brilliant tool and even better in SP2013.  You need to enable the developer dashboard.  You can also add custom custom monitored scopes that allow you to dive down into bottlenecks using the dev dashboard.

Visual Studio Web Tests:  Available in VS2010 and VS2012, these allow you to record browser actions, replay them and validate responses. 
  • Create a New Visual Studio Project of Type "Web And Load Test Project", The little red icon allows you open the web browser and record the browser activity.  I am using VS 2012 SP3 Ultimate Edition.
  • The images below show a simple recorded web test and it being run against individual WFE's and a load balancer.


Visual Studio Load Tests:  Add web tests or other tests together and create a load using TFS.  You can simulate load and add multiple agents to test your farm or code works under stress.  Integration, Ocded UI and Unit tests can be added to load tests but this can get fairly tricky so I find it easier to simulate load using combinations of web tests.

To create a load test, you need 1 or more web tests in the Load and web test project.  Right click the project and create a new load test.  Follow the wizard thru as shown below.
Run the Test and watch the performance counters on the SharePoint web, app and DB servers.

You can export the results into excel that provides detailed information about the load test.

Read More:
http://msdn.microsoft.com/en-us/library/vstudio/jj710162.aspx
http://blog.sharepointsite.co.uk/2013/07/identifying-page-load-times-using.html (Fiddler)
http://blog.sharepointsite.co.uk/2010/06/sharepoint-2010-developer-dashboard.html (Dev Dashboard)
http://blog.sharepointsite.co.uk/2011/01/developer-dashboard-custom-scoped.html (Dev dashboard & monitoring)

Update 26 Aug 2014
AlertFox is a useful tool for verifying page performance.  It has multiple useful functions such as monitoring the website is up and running macros to login, perform searches.  All these tasks record the time it takes and you can monitor performance from various locations such as the US or Europe. 

Thursday 25 July 2013

Identifying page load times using Fiddler

Problem:  I have poor performing pges and I need to see which pages are causing my issues, I have the Developer dashboard or web testing in Visual Studio 2012 Ultimate but a nice quick way to identify the issue is to use fiddler with a slight customisation.

Resolution: There are 2 options in Fiddler to monitor performance:
1.> Highlight the requests and click the Timeline tab
2.> Customise Fiddler to show request times for each request as shown below.

Process to Customise Fiddler:
Create a TTL column in fiddler to see how long each request is taking.  In Fiddler press Ctrl + R, this opens the editor CustomRules.js.  Edit as shown below.



In my scenario the page is taking 6 seconds to load as shown in yellow highlight.  My SQL database hosting my SP Config database could not grow.  Once I correct this, my TTL is under 0.1 seconds on a blank default publishing page.



More Info:
See other related Fiddler posts
Enable the developer dashboard post.

Friday 16 March 2012

Fiddler Tip - view https traffic

Problem:Need to see https traffic between the browser or any client application and the web server.

Inital Hypothesis:  Use fiddelr to trust the sites public certificate so that https traffic can be monitored.

Resolution:  Open Fiddler
Tools >Fiddler options > Https > Decrypt https traffic.  Accept the popups.




Updated 2017-06-02: Screens have changed slightly.
Update 2023-06-22: Auto responder - allows me to inject a local file instead of a network file, in the example below, I overwrite, making the developer loop much easier, and I can develop faster.
Streamline JavaScript web resource development using Fiddler AutoResponder (Developer Guide for Dynamics 365 Customer Engagement (on-premises)) | Microsoft Learn

Sunday 4 March 2012

Office document in SP2010 won't open - Explorer fails, SDP fails.

Problem: Can't open Office documents (Word, Excel or PowerPoint).  Additionally can't connect to SharePoint using SPD2010 or Publish forms using InfoPath 2010.  Another effect has been that Windows Explorer won't display document library's.
Initial Hypothesis:  A colleague of mine Grzegorz Skorupa in Poznan figured out the issue using Fiddler.  Our site was running over SSL so he had to decrypt the response's and requests using Fiddler.  Fiddler was also used to intercept the requests from the Office client program.  From this he could see MS Word issuing more than simply GET and POST verbs.  Recently our SharePoint test environment had been hardened which include only allowing GET & POST verbs.  This also only occurs if you are using STSsession cookies.  This was previously discussed http://blog.sharepointsite.co.uk/2010/11/change-to-session-cookies-for-claims.html

You can check your farms cookies session setting using the following PowerShell cmd:
PS> Get-SPSecurityTokenServiceConfig

As it has been explained to me, because the session cookies are being used, the cookies are no longer written to disk, so the Office application needs to authenticate (as it can't use the cookie created by the SharePoint browser session). The Office client uses WebDAV request, has to authenticate and it passes requests that are not GET or POST based to retrieve the file.

Resolution:  Check IIS and the instances of IIS are allowing all verbs in request filtering or use the default sessioncookies setting (false).
$sts = Get-SPSecurityTokenServiceConfig
$sts.UseSessionCookies = $false
$sts.Update()
iisreset

You can watch the http request types (request verbs) using Fiddler as highlighted below.

Tuesday 8 June 2010

Developer SharePoint Machine Prep

BgInfo - Automatically display local computer information on the desktop's background, such as the computer name, IP address, ect
Disable ShutDown Event Tracker - Stop the comment box on Shut down of your developer machine.
CKS - Community Kit for SharePoint: Development Tools Edition by Matt Smith and others. Invaluable if not just for deployment of code.
.NET reflector - Explore compiled .NET assemblies
SharePoint Dispose Checker Tool
SharePoint Manger
U2U - CAML builder tool - Still a great tool and works with SP2010
WireShark
SharePoint Designer (SPD) 2010
Visual Studio 2010 (Professional version is the lowest edition but any version will work)
FireFox with Firebug (like the IE developer toolbar, good developer tools e.g. css), collazilla (colour picker for firefox), Firequery (jQuery addin), FiddlerHook (integrate Fiddler) & YSlow (Page performance and optimisation)
Fiddler
IE Developer Toolbar part of IE 8
Update 29/08/2010 - Visual Studio 2010 SharePoint Power Tools - Useful if you are using Sandboxes, adds 2 functions: Sandbox visual web parts & Sandboxed compilation.  Also note CKS has remove there sandboxed template in version CKSDev 1.1 release 1 August 2010.  Update 23/06/2012 - CKSDev is at version 2.4
Accessibility: http://www.cynthiasays.com/ &
Update 20/09/2010 - Also add Visual Studio 2010 Sharepoint Power Tools, it has sandboxed solutions and sandboxed visual web parts has been removed from the CKSDev project, so also get the latest CKSdev code.
Update 20/09/2010 - SPTraceView on codeplex is worth installing.
Update 26/11/2010 - Enable wifi on Windows 2008 R2
Update 24/06/2011 - Smtp4Dev is a useful codeplex project for collecting email sent from the dev machine.
Update 24/06/2011 - Office 2010 Plus has all the office applications and includes InfoPath.
Update 24/06/2011 - Visual Studio 2010 SP1 was realease in May 2011 and should be installed.
Update 24/06/2011 - Unit Testing nUnit, TestDrive.NET & TypeMoch or Rhino Mochs.
Add VS cmd prompt to VS using External Tools:  %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
Update 08/01/2013 - Create Shortcuts on the desktop using Powershell (14 hive folder and  hosts.exe) download
Update 09/01/2013 - Ps to add hosts entries.
Update 13/02/2014 - Process Explorer (Usefule if a machine has high memory, CPU or IO issues)
SoapUI if you are working with web Services.