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,一经查实,立即删除!

相关文章

调试技巧——宏定义开关和printf

转自http://blog.csdn.net/guanyasu/article/details/51866984 #ifndef __CONFIG_H__ #define __CONFIG_H__#define DEBUG/*#undef DEBUG */#ifdef DEBUG #define debug(...) \{\fprintf(stderr,"[DEBUG] [%s:%s:%d]",__FILE__,__FUNCTION__,__LINE__);\fprin…

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 …

Java中装箱与拆箱

JDK5.0 之后提供了一种新特性&#xff1a;自动装箱拆箱。 既然是装拆箱&#xff0c;那么我们先来看看这个所谓的“箱”&#xff1a; java中的8种基本数据类型都有与之对应的封装类&#xff08;封装类就是所谓的箱&#xff09;。分别是&#xff1a;byte short int long double f…

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

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

位操作的细节

一、位操作符 &#xff08;1&#xff09;位与& 位与符号是一个&&#xff0c;两个&&是逻辑与。位与时两个操作数是按照二进制位彼次对应位相与的&#xff0c;逻辑与是两个操作数作为整体来相与的。&#xff08;举例&#xff1a;0xAA&0xF00xA0, 0xAA &&…

Android支付接入(五):机锋网

前边已经陆续跟大家走了一遍运营商和支付宝付费接入&#xff0c;今天跟大家一起看看机锋网的支付接入。事实上付费接入本身并没有太多须要注意的地方&#xff0c;做的多了以后你会发现套路都是大同小异的。而须要注意的地方在于怎么跟游戏兼容及后期的维护&#xff0c;包含增减…

内存的使用

内容整理于朱有鹏老师的课程。 1、冯诺依曼结构和哈佛结构 冯诺依曼结构是数据和代码放在一起&#xff0c;哈佛结构是数据和代码分开存在。什么是代码&#xff1a;函数。什么是数据&#xff1a;全局变量、局部变量。在S5PV210中运行的linux系统上&#xff0c;运行应用程序时&am…

java启动密码,java - 用户验证密码后如何启动java applet程序? - SO中文参考 - www.soinside.com...

我正在尝试连接两个简单的java程序&#xff0c;一个密码登录程序&#xff0c;然后打开第二个程序(一个非常简单的PrintWriter程序)。我是一个大型菜鸟&#xff0c;所以尝试将二级程序添加到密码程序中。显然这没用。我看到很多关于创建密码程序的条目&#xff0c;以及一些关于使…

WPF 中的换行符

WPF中UI上和后台代码中的换行符不同。 其中&#xff1a; XAML中为 C#代码中为 \r\n 或者&#xff1a; Environment.NewLine转载于:https://www.cnblogs.com/eric_ibm/archive/2013/05/09/WPF.html

matlab教程蚁群算法,蚁群算法怎样用MATLAB仿真

蚁群算法采用matlab开发的仿真平台&#xff1a;算法实现&#xff0c;路径显示&#xff0c;人机交互控制等希望对你有帮助&#xff01;是可以运行的% the procedure of ant colony algorithm for VRP%% % % % % % % % % % %%initialize the pa…

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;它跟普通变量没有任何本质区别。指针完整的名字…

网络游戏性能测试的几点想法

进入游戏行业也有一段时间了&#xff0c;在日常的工作中对游戏的性能测试也产生了一些想法&#xff0c;因此写出来与大家讨论讨论。网络游戏行业现在越做越大&#xff0c;面也越来越广了&#xff0c;依我的观点主要分为以下几个方面&#xff1a;1、传统的c/s架构的网络游戏&…

mongodb java报授权,mongoDB 3.0用户创建与授权

选择数据库 use admin添加用户&#xff1a;db.createUser({user: "admin",pwd: "12345678",roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]})此命令创建的用户只有管理用户的权限&#xff0c;并没有操作数据库的权限。查看…

交换排序-经典的快速排序算法总结

时间复杂度&#xff0c;平均O&#xff08;nlogn&#xff09;&#xff0c;最坏O&#xff08;n)&#xff1b; 不稳定的算法 1、算法思想 快速排序是C.R.A.Hoare于1962年提出的一种划分交换排序。它采用了一种分治的策略&#xff0c;通常称其为分治法(Divide-and-ConquerMethod)。…

c语言数组问题解析

#import <Foundation/Foundation.h>#define COUNT 10int main(int argc, const char * argv[]){//1、随机产生20个[10 , 50]的正整数存到数组中&#xff0c;并求数组中的所有元素最大值、最小值、平均值以及各元素之和。第二大值。// int max 0, min 0, sum 0, sec…

指针学习2

主要是指针数组、数组指针、函数指针的学习&#xff0c;以及二重指针、二维数组的学习。 一、指针数组与数组指针 1、概念 指针数组的实质是一个数组&#xff0c;这个数组中存储的内容全部是指针变量。数组指针的实质是一个指针&#xff0c;这个指针指向的是一个数组。2、分析…

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下会报…