0

我是一个菜鸟,开始学习 Fiddler2,用我的 ASP.NET webforms 应用程序来解决一些问题。当我查看特定请求时,我只能通过 Raw 选项卡查看 Request.Forms 集合中的数据。我希望看到通过 WebForms 选项卡显示的名称:值对,但我收到消息:“请求正文类型不是 x-www-form-urlencoded”。

对此进行研究,我发现以下语句:“当 HTTP 请求 Content-Type 值为“application/x-www-form-urlencoded”或“multipart/form-data ”时,会填充 Form 属性。在http://msdn .microsoft.com/en-us/library/system.web.httprequest.form.aspx

这是原始视图中请求标头的“顶部”:

POST http://mdwdata/sdkTrimFileServiceASMXclient/launcher.aspx HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://mdwdata/sdkTrimFileServiceASMXclient/launcher.aspx
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.3)
Content-Type: multipart/form-data; boundary=---------------------------7db1fe37801ce
Accept-Encoding: gzip, deflate
Host: mdwdata
Content-Length: 2860
Connection: Keep-Alive
Pragma: no-cache

我的网络表单应用程序非常标准。这是我的 .ASPX 表单顶部的一个片段:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="launcher.aspx.cs" Inherits="WebClient.launcher" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title></title>  
</head>  
<body>  
    <form name="form1" method="post" action="launcher.aspx" id="form1" enctype="multipart/form-data">  `

enctype必须是默认值,因为它不存在于我的 .aspx 源代码中,但上述值是从 Fiddler 中特定 HTTP 会话的 Response - Syntax 视图复制而来的。

通过 Intellisense 快速查看显示<form元素没有提供 x-www-form-urlencoded 的关键字。这些是我进一步了解 Fiddler 的“小步骤”——它是否应该在此处识别 Web 表单并将其显示在 Inspector WebForm 视图中?

4

2 回答 2

0

Fiddler 的“WebForm”视图目前不支持除 application/x-www-form-urlencoded 之外的任何表单类型,因此它显示的消息。您可以改用其他检查器。

于 2011-09-12T22:54:03.020 回答
0

在提琴手去inspectors,然后Raw选项卡。然后,您将能够编辑您想要的内容。

于 2014-02-07T22:43:52.763 回答