Aug 17, 2011

Handle Web Exception raised from HttpWebRequest in C#

The HttpWebRequest and HttpWebResponse classes from the .NET Base Class Library make it easy to access Internet resources through a request/response model. The Httprequest object identifies the Web page to get and contains a GetResponse() method for obtaining a HttpWebResponse object. With a HttpWebResponse object, we retrieve a stream and extract page information using stream operations.

Jul 15, 2010

Submit ASP.NET Form quickly from C# app using Fiddler

The easiest way to see browser server interaction is to use a tool like Fiddler, which shows every request and response between your machine and a web server. It allows to inspect all http(s) traffic, set breakpoints. Generally, it is required to submit web form programmatically and for this, we must know about http request/response format for the web page. Here is simple example to submit web form from C# windows app with the help of Fiddler.