SharePoint 2013 Workflow - Advanced Workflow Debugging with Fiddler

 

来自:Andrew Connell [MVP SharePoint]   |  时间:2012-07-18 19:26:30 

原文链接: http://www.andrewconnell.com/blog/archive/2012/07/18/sharepoint-2013-workflow-advanced-workflow-debugging-with-fiddler.aspx

In previous posts I've talked about what's new with workflow in SharePoint 2013 as well as the very cool new DynamicValue data type which comes in supremely helpful when working with Odata services or anything service that speaks JSON. With this new architecture you'll see there's a lot of chatter between SharePoint & the Windows Azure Workflow (WAW) farm over the wire. In addition, now that our workflows can not only call web services but also we're advised to stop putting custom code in the workflow but rather stuff it in services and call these services with the new HTTP activities, there's even more over-the-wire communication going on.

Wouldn't it be nice to debug this or watch all this go on? Well you can thanks to Fiddler . The trick is you just need to know how to intercept the calls from SharePoint & WAW so you can see everything in the Fiddler trace. There are just a few steps to do:

Tweak the .NET Framework Config

Open the two machine.config files for the framework and add the following to the bottom of each, just before the closing </configuration>. Oh... Please back them up first so you can't go all "oh AC broke my dev box" on me…

<system.net>
<defaultProxy enabled="true">
<proxy bypassonlocal="false" usesystemdefault="true" />
</defaultProxy>
</system.net>

  • %systemdrive%\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
  • %systemdrive%\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config:
Configure Fiddler to Intercept HTTP(s) Traffic

Now configure Fiddler to intercept the traffic coming from SharePoint and WAW. If you are using a HOSTS file for your DNS stuff… err cheating… make sure you import that:

  1. Fiddler > Tools > Hosts
  2. Click the Import Windows Hosts File link

Next up, setup the connections in the options dialog:

  1. Fiddler > Tools > Fiddler Options > Connections [tab]
  2. Make sure the following are checked, anything not mentioned here should be unchecked:
    1. Reuse client connections
    2. Reuse connections to servers
    3. Act as system proxy on startup
    1. Monitor all connections

Configure SharePoint to Trust Traffic from Fiddler

Fiddler not only is a HTTP debugging proxy used to see what's going on, but it is also going to forward the calls along to the intended target. There's one catch here from using Fiddler in normal debugging practices. Because SharePoint & WAW talk to each other over SSL, you have to tell them to trust Fiddlers cert which is used to re-encrypt the traffic after debugging it. In order to let SharePoint & WAW continue to work while debugging, you need to install the Fiddler certificate as a trusted root on the box.

First, tell Fiddler to decrypt the traffic and export it's certificate:

  1. Fiddler > Tools > Fiddler Options > HTTPS [tab]
  2. Check Capture HTTPS Traffic
  3. Check Decrypt HTTPS Traffic

  4. Click the button Export Root Certificate to Desktop and then click Yes to confirm.

  5. You'll get yet another confirmation prompt about installing the cert from a CA with something like "DO NOT TRUST" in the dialog… but you can trust me.. Just click YES :)

  6. Last up, click the Ignore server certificate errors.

Last step is to install the certificate you just exported to the desktop. Launch theSharePoint Management PowerShell Console as an administrator and type the following:

  • certUtil.exe -addstore -enterprise -f -v root [path to desktop]\FiddlerRoot.cer
  • $trustCert = Get-PfxCertificate [path to desktop]\FiddlerRoot.cer
  • New-SPTrustedRootAuthority -Name "Fiddler" -Certificate $trustCert
  • IISRESET
Now Test Away!

Now you're all configured… the last thing is to actually check it out. The most important thing here is to start things up as the right user and in the right order.

  1. First, login to the machine(s) where you have SharePoint & WAW installed as the user that you are using as the service account for each product. For me on my dev box, I run them under the same service account on the same box so this is easy. You must login as the user that you're using as the service account to see the traffic.
  2. From that login, launch Fiddler.
  3. Now, in order for Fiddler to catch the traffic both apps need to be restarted so when they start up, Fiddler will be able to step between them.
    1. Recycle the web server by using the IISRESET command from a command prompt. Yes, you have to do this again AFTER you have Fiddler running.
    2. Recycle the WAW server by finding the service called WorkflowBackendService… I think that's the name… writing this from memory.

That's it! Now you can login to your dev machine as your developer account and test a workflow. You should be catching the traffic and watch all the client side object model (CSOM) chatter going on from WAW > SharePoint and SharePoint calling WAW… pretty neat stuff!

转载于:https://www.cnblogs.com/frankzye/archive/2013/05/07/3065550.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/461107.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

java sheet 打印区域设定,如何使用Java设置电子表格的打印区域。(How to set the print area of a spreadsheet using Java.)...

如何使用Java设置电子表格的打印区域。(How to set the print area of a spreadsheet using Java.)问题描述 (Problem Description)如何使用Java设置电子表格的打印区域。解决方案 (Solution)以下是使用Java设置电子表格打印区域的程序。import java.io.File;import java.io.Fi…

RedHat6.2 x86手动配置LNMP环境

为什么80%的码农都做不了架构师&#xff1f;>>> 因为公司要求用RedHat配&#xff0c;顺便让我练习一下Linux里面的操作什么的。 折腾来折腾去终于搞好了&#xff0c;其实也没那么难嘛。但是也要记录一下。 首先&#xff0c;是在服务器里面用VMware搭建的RedHat6.2 …

《c语言深度剖析》读书笔记

一、注意点 1、 2、 3、 4、 5、 6、 7、 8、 9、 10、 11、 二、问题 1、 2、 3、 4、 5、 6、 7、

androidpn的一次亲密接触(二)

简单看了一下源码的实现&#xff0c;这里贴一点个人觉得比叫重要的代码。 XmppManager.java 构造方法&#xff1a;Java代码public XmppManager(NotificationService notificationService) 在这里主要是从共享引用中取得xmpp服务器地址和端口号、用户名和密码。 内部类Java代码…

指针知识学习[总]

printf("p %p.\n", p); // %p打印指针和%x打印指针&#xff0c;打印出的值是一样的 printf("p 0x%x.\n", p); 一、指针是什么&#xff1f; 1、指针变量和普通变量的区别 指针的实质就是个变量&#xff0c;它跟普通变量没有任何本质区别。指针完整的名字…

php excel 分页,excel分页线怎么增加

增加excel分页线的方法&#xff1a;首先依次点击“工作簿视图-分页预览”&#xff1b;然后点击要在其下方插入分页符的这一行&#xff1b;最后在“页面布局”选项卡上的“页面设置”组中&#xff0c;单击“分隔符”即可。本文操作环境&#xff1a;Windows7系统&#xff0c;Micr…

C# 中的委托和事件

PDF 浏览&#xff1a;http://www.tracefact.net/Document/Delegates-and-Events-in-CSharp.pdf文中代码在VS2005下通过&#xff0c;由于VS2003(.Net Framework 1.1)不支持隐式的委托变量&#xff0c;所以如果在一个接受委托类型的位置直接赋予方法名&#xff0c;在VS2003下会报…

php7 有ext skel吗,PHP扩展开发系列02 - 老司机起步之函数

上一篇扩展开发引导文章中。创建了编写扩展的三个基本文件。或许你会有个疑问PHP没有类似的自动生成项目框架的工具吗&#xff1f; 当然有。这篇文章就开始介绍使用 "php-ext-cli" 工具来生成扩展项目文件注意这里的 "php-ext-cli" 本身没有这玩意&#xf…

(转载)说说char

char一直都在使用并且大量的使用&#xff0c;但是&#xff0c;大部分都是在单一平台上&#xff0c;那样没有太多的问题&#xff0c;在windows上大量直接使用wchar_t来解决中文的问题。并且在使用跨平台时也大多直接使用了Qt的QString来节省了很多的麻烦&#xff0c;但是现在项目…

WPF 正確理解ContentPresenter

2019独角兽企业重金招聘Python工程师标准>>> 我們先由下圖來看類層次,可知ContentControl繼承Control,ContentPresenter繼承FrameworkElement(Control也繼承FrameworkElement); 同樣的,ItemsControl繼承Control,ItemsPresenter繼承FrameworkElement. 在Control類並…

java动态交叉表,SqlServer如何生成动态交叉表查询

为了说明问题&#xff0c;我们用SqlServer自带的事例数据库(Northwind)来进行验证&#xff0c;所有的例子请放到Northwind中运行&#xff0c;我可能会省略Use语句&#xff0c;所引用的表&#xff0c;都是Northwind中的&#xff0c;下面我就不再说明了这里指的交叉表&#xff0c…

Canvas Clock

这两天在看html5的canvas,实现了上面那个东西 需要注意的地方&#xff1a; 1.canvas的sava()和restore()理解和使用 2.canvas的translate scale rotate ..的使用&#xff0c;每个变化都应该清楚圆心和角度..看&#xff1a;http://blog.sina.com.cn/s/blog_8fab526c01015tqs.htm…

CentOS 6.3 下用ntfs-3g挂载Windows NTFS分区

2019独角兽企业重金招聘Python工程师标准>>> 默认情况下&#xff0c;CentOS 6.3不支持Widows NTFS硬盘分区读写&#xff0c;要想把NTFS格式的磁盘挂载到CentOS 6.3下面需要安装第三方的插件ntfs-3g&#xff0c;这里我们采用编译安装插件。 1、安装编译器&#xff0c…

C++的const修饰

2019独角兽企业重金招聘Python工程师标准>>> C的const修饰 ‍const的两个用途‍ &#xff08;1&#xff09;可以定义 const 常量 &#xff08;2&#xff09;const 可以修饰函数的参数、返回值. const的好处 &#xff08;1&#xff09;便于进行类型检查&#xff0c;…

心率变异性 matlab,心率变异性好的功率谱分析方面的问题

本帖最后由 天路 于 2018-2-25 21:16 编辑本人正在学习心率变异性方面的内容&#xff0c;但是按照文献上的方法做出来的结果并不是很理想&#xff0c;文献上说的是心率变异性的频率的范围是0.4以内&#xff0c;但是我做的功率谱上显示频率分布在整个频域内&#xff0c;试了很多…

决策树php,决策树模型组合之随机森林与GBDT

前言&#xff1a;决策树这种算法有着很多良好的特性&#xff0c;比如说训练时间复杂度较低&#xff0c;预测的过程比较快速&#xff0c;模型容易展示(容易将得到的决策树做成图片展示出来)等。但是同时&#xff0c;单决策树又有一些不好的地方&#xff0c;比如说容易over-fitti…

关于uboot的简介——uboot的目录结构

以下内容源于朱有鹏嵌入式课程的学习与整理&#xff0c;如有侵权请告知删除。 不同版本的uboot&#xff0c;或者同一版本不同人员移植的uboot&#xff0c;目录结构和文件内容都会有所不同&#xff0c;也就是说&#xff0c;可以根据需要去添加、删除或者更改目录结构。在以三星的…

Photoshop绘制植物大战僵尸中的食人花

本人意见&#xff1a;我打算使用本文中的食人花形象作为我的一次讲课中的主要参考。我想说明的是&#xff0c;通过FLASH和PS都能够轻松地绘制出如本文所描述的食人花卡通效果。独立游戏开发者如果安排好时间&#xff0c;完全可以通过1-2个月掌握FLASH和PS绘制&#xff08;想精通…

uboot源码——uboot启动内核过程总结

总结的思维导图&#xff0c;其下载地址&#xff1a;Uboot启动.mmap_免费高速下载|百度网盘-分享无限制 第一阶段&#xff1a;汇编阶段&#xff0c;即start.S文件的工作。 第二阶段&#xff1a;C代码阶段&#xff0c;即start_armboot函数的工作。 值得一提的是&#xff0c;star…

虚拟化运行[OpenStack] VMWare产品介绍

最近使用开发的过程中出现了一个小问题&#xff0c;顺便记录一下原因和方法--虚拟化运行 世界上最早研制虚拟化软件的厂商之一。目前是是寰球桌面到数据中心虚拟化解决方案的引导厂商。中文名“威睿”&#xff0c;纽约证券交易所代码&#xff1a;VMW。总部设在加利福尼亚州的帕…