The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140417-Windows-8.1-Update-says-it-failed-but-it-succeeded

    20140417-Windows-8.1-Update-says-it-failed-but-it-succeeded--Windows-Help-and-Support--cannot-find-any-info--how-surprising-it-never-does

    20140329-VMware-vSphere-Client-4.1-retry-with-compatibility-settings

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,251 other followers

Archive for the ‘.NET’ Category

.net/C# – Serialize into an XML Fragment – not XML Document – Stack Overflow

Posted by Jeroen Pluimers on 2014/04/17

Thanks User Andrew Hare – Stack Overflow for answering this on Stack Overflow.

I’m pretty sure it works in all .NET and C# versions starting with 2.0.

Here is a hack-ish way to do it without having to load the entire output string into an XmlDocument: Read the rest of this entry »

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »

c# – Is there a library that gets the media type and subtype out of a HttpWebResponse/WebResponse ContentType? – Stack Overflow

Posted by Jeroen Pluimers on 2014/04/16

Just asked this on SO: C# – Is there a library that gets the media type and subtype out of a HttpWebResponse/WebResponse ContentType?.

Anyone here or at G+ that has a hint?

The ContentType property of (Http)WebResponse maps to the HTTP/1.1 Content-Type which is a Media-Type that contains a type/subtype optionally followed by parameters which are attribute=value pairs.

I’m mainly interested in the type/subtype and the charset parameter.

The charset is mapped from HttpWebRequest.CharacterSet.

Is there a library that just retrieves the media type/subtype of the ContentType?

–jeroen

via: c# – Is there a library that gets the media type and subtype out of a HttpWebResponse/WebResponse ContentType? – Stack Overflow.

Posted in .NET, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, ASP.NET, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development, Visual Studio 11, Visual Studio 2008, Visual Studio 2010, Visual Studio 2013, Visual Studio and tools | Leave a Comment »

Fiddler2 to the max: inserting proxy authentication to use DropBox (or other app) behind a corporate firewall

Posted by Jeroen Pluimers on 2014/04/16


A while ago, I was working with a not so cooperative corporate firewall. All web browsers would work fine, but most other applications would not go through the proxy in a nice way.

For instance, DropBox would show the dreadfull “Connection Error” dialog shown on the right.

That dialog basically means “Dropbox has no clue what happens, try fiddling with your proxy or account settings, then press Reconnect Now” to retry.

Many other applications had issues (for instance Visual Studio connecting to Team Foundation System was very unreliable and the workarounds clumsy).

CNTLM: not the solution

I got inspired by the I code and code: Tutorial: How to use Dropbox behind a corporate proxy server using CNTLM, even though I was pretty sure the corporate firewall was not NTLM based.

And indeed, CNTLM -v -M http://google.com -c CNTLM.INI would give errors like this:

cntlm: Proxy returning invalid challenge!
headers_send: fd 4 warning -999 (connection closed)
Connection closed

HTTP Fiddler: looks promising

So I fired up my old buddy Fiddler 2 HTTP debugging proxy.

Further on, you will learn that Fiddler2 is much more, but right now it is enough to know that it basically sits as a local proxy between your applications and the outside world. Read the rest of this entry »

Posted in .NET, Software Development, Development, Power User, JavaScript, Windows 7, Windows Vista, Windows XP, SocialMedia, Scripting, Windows 8, Windows, JavaScript/ECMAScript, .NET 4.5, Windows Server 2003, Windows Server 2008, Windows Server 2000, Windows Server 2003 R2, Windows Server 2008 R2, .NET 3.5, .NET 2.0, .NET 3.0, .NET 4.0, DropBox | Leave a Comment »

Monitoring HTTP Output with Fiddler in .NET HTTP Clients and WCF Proxies – Rick Strahl’s Web Log

Posted by Jeroen Pluimers on 2014/04/15

Reminder to self: for HttpWebRequest make sure you have your proxy setup correctly.

Monitoring HTTP Output with Fiddler in .NET HTTP Clients and WCF Proxies – Rick Strahl’s Web Log.

–jeroen

Posted in .NET, Software Development, Development, C#, Visual Studio and tools, C# 2.0, C# 3.0, ASP.NET, Web Development, C# 4.0, Fiddler, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, .NET 4.5, C# 5.0, Visual Studio 11, .NET 3.5, .NET 2.0, .NET 3.0, .NET 4.0 | Leave a Comment »

How to hang Visual Studio <= 2013

Posted by Jeroen Pluimers on 2014/04/15

Simple steps on how to hang visual studio:

  1. Debug a piece that throws an uncatched System.Net.WebException (probably works with many more kinds of exceptions)
  2. In the “WebException was unhandled by user code” pane, press “View Detail…”
  3. In the “View Detail” modal dialog, press the * key on your numeric keypad (this is the “Expand all” command for a TreeView)

This will get you a nice box (and no way to close Visual Studio except killing it from the task manager):

Microsoft Visual Studio is Busy

Microsoft Visual Studio is waiting for an internal operation to complete. If you regularly encouter this delay during normal usage, please report this problem to Microsoft.

There seems to be no bounds checking for the “Expand All” functionality.

–jeroen

Posted in Software Development, Development, Visual Studio and tools, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio 11 | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 1,251 other followers

%d bloggers like this: