来自: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

SharePoint 2013 Workflow - Advanced Workflow Debugging with Fiddler相关推荐

  1. VS2012 开发SharePoint 2013 声明式workflow action(activity)之 HelloWorld

    本文讲述VS2012 开发SharePoint 2013 声明式workflow action 之 HelloWorld. 使用VS2012开发客户化的workflow action是SharePoi ...

  2. SharePoint 2013 workflow cannot start automatically when you logged in site as a system account

    I have created one simple workflow on custom list using SharePoint designer 2013.While designing wor ...

  3. SharePoint 2013 版本功能对比

    原文:SharePoint 2013 版本功能对比 前言:在SharePoint使用中,经常纠结于版本问题,SharePoint 2013主要有免费的Foundation和收费的标准版.企业版三个版本 ...

  4. SharePoint 2013版本功能对比介绍

    转:http://www.fengfly.com/plus/view-213720-1.html 在SharePoint使用中,经常纠结于版本问题,SharePoint 2013主要有免费的Found ...

  5. SharePoint 2013 工作流之使用Visio设计篇

    原文:SharePoint 2013 工作流之使用Visio设计篇 SharePoint 2013增强了工作流,不仅仅基于WorkFlow Foundation 4.0了,设计方式也不仅仅是Desig ...

  6. SharePoint 2013 开发——SharePoint Designer 2013工作流

    博客地址:http://blog.csdn.net/FoxDave SharePoint Designer 2013为开发者和高级用户提供了两种创建定制工作流的模式: 基于文本的设计器--即我们一直 ...

  7. SharePoint 2013常用开发工具分享

    众所周知,一款好的开发工具不仅能提高项目开发效率,而且能够协助开发人员简化开发流程.本文汇总几款SharePoint 2013开发常用开发工具,希望能够对大家有所帮助.如果您有更好的工具,没有包含在本 ...

  8. SharePoint 2013 Farm 安装指南——Least Privilege

    写过很多关于SharePoint 2013 安装,这是第四篇.可能你会觉得为什么如此简单的安装至于花那么多精力去折腾吗.我的答案是肯定的.知识的积累不是一蹴而就的,而是循序渐进的去学习,每一个阶段都有 ...

  9. SharePoint 2013 中的新增功能(与开发有关)

    了解 SharePoint 2013 中的新增特性和功能,包括新的云应用程序模型.开发工具.平台增强功能.移动应用程序以及更多其他功能. 适用范围: 云应用程序模型 SharePoint 2013 引 ...

最新文章

  1. 金融学名词M0, M1, M2, M3, M4, M5, M6
  2. 利用ida对程序的静态链接库进行处理
  3. React开发(235):document.body.clientHeight
  4. python 自动发邮件 Errno61 Connection refused
  5. linux系统 看com口,Linux如何设置com1口,让超级终端通过com1口进行登录
  6. 计算机网络—SR选择重传协议
  7. 湖南大学高级软件开发过程
  8. 教师管理系统java_基于jsp的教师管理系统-JavaEE实现教师管理系统 - java项目源码...
  9. ESP8285与ESP8266的差异
  10. Android 混淆规则
  11. Windows下Python的安装与配置
  12. Windows XP更新后出现“你可能是盗版软件受害者”解决方法
  13. python实现火车票查询订票退票_使用Python和Splinter实现12306火车票查询与抢票
  14. mysql new 与old_mysql触发器new和old区别 阿星小栈
  15. 后羿采集器怎么导出数据_后羿采集器如何采集亚马逊评论
  16. JAVA_HOME查看和设置
  17. 警告“未引用的形参/局部变量”的消除方法
  18. 现代密码学:数字签名
  19. nfcwriter写入_NFC 标签联系人写入教程:Tagstand Writer
  20. Lua判断一个对象是否为空,包含userdata

热门文章

  1. Apollo进阶课程 ⑨ | 业界的高精地图产品
  2. php设置上传文件大小限制_php修改上传文件大小限制实例详解
  3. netmiko检测linux基线,网络设备自动巡检工具
  4. 模拟注册用户,按照以下要求实现相关功能:
  5. jays+android耳机,android – 响应多按钮有线耳机
  6. java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener
  7. java math 函数_Java中Math类常用函数总结
  8. C++ 流的操作 | 初识IO类、文件流、string流的使用
  9. 最容易进的大厂工作,百度经典百题
  10. 串的定长存储表示【数据结构】