Search code examples
webformsfiddlermultipartform-datainspector

Fiddler2 inspector cannot show WebForms view of request despite content-type: multipart/form-data


I'm a rookie starting to learn Fiddler2 chasing some problems with my ASP.NET webforms app. When I look at a particular request, I can only see the data in the Request.Forms collection via the Raw tab. I was hoping to see the Name:Value pairs shown via the WebForms tab but I get back the message: "Request body type is not x-www-form-urlencoded".

Researching this, I found this statement: "The Form property is populated when the HTTP request Content-Type value is either "application/x-www-form-urlencoded" or "multipart/form-data". at http://msdn.microsoft.com/en-us/library/system.web.httprequest.form.aspx

Here is the "top part" of the Request Header from the Raw view:

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

My webforms application is pretty standard. Here is a snippet from the top of my .ASPX form:

<%@ 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">  `

The enctype must be a default because it is not present in my .aspx source code but the above value is copied from the Response - Syntax view of the particular HTTP session in Fiddler.

A quick look via Intellisense on the shows no keyword for the <form element to provide x-www-form-urlencoded. These are my "baby-steps" with getting to know more about Fiddler - should it recognize the webform here and show it in the Inspector WebForm view?


Solution

  • Fiddler's "WebForm" view does not currently support any form type except application/x-www-form-urlencoded, hence the message that it shows. You can use the other Inspectors instead.