WebLog Posts in Category HTTP

Using FiddlerCore to capture HTTP Requests with .NET
July 29, 2014 @ 2:03am

If you have an application that needs to capture HTTP or monitor HTTP traffic, FiddlerCore is the tool you can use to do it easily. In this post I demonstrate how easy it is to integrate FiddlerCore into an application to capture HTTP requests and save the data, as well as discuss how to deal with configuring FiddlerCore for SSL Certificate installation for HTTPS captures.

Creating ASP.NET MVC Negotiated Content Results
May 20, 2014 @ 9:13pm

ASP.NET MVC doesn't directly support content negotiation, but with a little bit of work it's very straight forward to implement a NegotiatedContent ActionResult that can switch its response type based on the Accept header.

Smoothing out <div> scrolling in Mobile WebKit Browsers
June 01, 2013 @ 6:13pm

Webkit mobile browser's default scroll behavior is terrible. Default scrolling is slow and it chokes on larger lists becoming erratic or appearing to lock up altogether. Luckily there's an easy workaround using the -webkit-overflow-scroll style, but it too comes with a few caveats. Here's more info.

Translating with Google Translate without API and C# Code
August 06, 2011 @ 3:44pm

Google Translate recently changed over to an AJAX UI that broke some of my old screen scraping code I used to do translations in my ASP.NET Resource Provider resource administration app. After a bit of spelunking I found an alternative using the REST calls directly to get back the functionality I lost.

Opening the Internet Settings Dialog and using Windows Default Network Settings via Code
July 20, 2011 @ 12:02am

Most applications that need to use HTTP to go online require some sort of HTTP configuration options to allow for custom network configurations. An easy way to do this is to rely on the default connection settings that Windows provides. Here's how to use the Windows network settings and how to bring them up visually for editing programmatically.

WinInet Apps failing when Internet Explorer is set to Offline Mode
April 20, 2011 @ 10:15pm

Ran into a problem with applications using WinInet not being able to connect to the Internet when IE is stuck in Offline Mode. Here's the problem and a code workaround that works at least with the latest version of IE.

Custom ASP.NET Routing to an HttpHandler
March 28, 2011 @ 3:02pm

Routing support in ASP.NET 4.0 has been vastly improved, but custom routing still involves a fairly complex process of creating RouteHandlers and mapping requests properly. In this post I show an example of how to create custom routes automatically via Attribute route mapping for Http Handler endpoints.

HttpWebRequest and Ignoring SSL Certificate Errors
February 11, 2011 @ 5:14am

Man I can't believe this. I'm still mucking around with OFX servers and it drives me absolutely crazy how some these servers are just so unbelievably misconfigured. I've recently hit three different 3 major brokerages which fail HTTP validation with bad or corrupt certificates at least according to...

HttpWebRequest and GZip Http Responses
June 29, 2007 @ 2:57am

I've talked a bit about GZip compression (here and here and here) on the server recently. It's pretty straight forward to use GZip compression either by letting IIS do it for you automatically or by using some simple ASP.NET code to compress content. As a quick review to create GZip content on...

The server committed a protocol violation with WebRequest
March 29, 2007 @ 7:03pm

I've been working with a host of different OFX financial services to retrieve data from remote servers and merge them into one of my client's systems. These servers are a wide variety of different Web Servers and using various versions of the OFX protocols which has been nothing short of a...