Archive for the ‘.NET’ Category
Posted by jpluimers on 2014/04/23
I just bumped into Compile and Execute C# Sharp online.
As of writing, it uses Mono 2.10.2.0 which is quite old, and it is dead slow: it takes more than a minute to compile and execute a simple console application.
The reason is that this is a one man project.
IdeOne is much faster, for instance it took a few seconds to compile and run this simple C# program.
–jeroen
Posted in .NET, C#, Development, Mono, Software Development | Leave a Comment »
Posted by jpluimers on 2014/04/22
The first bulleted link below has been living in my drafts like forever (i.e. somewhere since mid June 2009), so time to write a bit about ISO 8601 and .NET.
First a few links about converting a DateTime into ISO 8601 string format:
Some solutions use the “K” as a time zone specifier. At first, I couldn’t find any documentation for it, not even Google Search for Google Search for “ssK” DateTime ToString returns anything useful.
Later on, I found The “K” Custom Format Specifier in Custom Date and Time Format Strings.
So my preferred solutions for me are these:
System.DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ssK");
System.DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssK");
I avoid these:
System.DateTime.Now.ToString("o");
because it gets you too many digits in the second fracion.
System.DateTime.Now.ToUniversalTime().ToString("s") + "Z";
because it is less clear what it does (might be resolved with a comment).
–jeroen
–jeroen
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, ISO 8601, Software Development | 1 Comment »
Posted by jpluimers 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 »
Posted by jpluimers on 2014/04/16
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 »
Posted by jpluimers 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 [WayBack] 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 [WayBack] 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, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, base64, Cntlm, Development, DropBox, Encoding, Fiddler, JavaScript/ECMAScript, NTLM, Power User, Scripting, SocialMedia, Software Development, Web Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP, Windows-Http-Proxy | Leave a Comment »
Posted by jpluimers on 2014/04/15
Posted in .NET, .NET 2.0, .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, Fiddler, Software Development, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Web Development | Leave a Comment »
Posted by jpluimers on 2014/04/15
Simple steps on how to hang visual studio:
- Debug a piece that throws an uncatched System.Net.WebException (probably works with many more kinds of exceptions)
- In the “WebException was unhandled by user code” pane, press “View Detail…”
- 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 Development, Software Development, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2014/04/11
This Explorer extension is brilliant: Path Copy Copy – Home.
It works in Windows XP and up (including 7, 8 .x, 20xx Server, etc).
The Open Source is done in Visual Studio with C++.
–jeroen
Read the rest of this entry »
Posted in C++, Development, Power User, Software Development, Visual Studio 2010, Visual Studio and tools, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »
Posted by jpluimers on 2014/04/10
Posted in .NET, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/04/09
Just bumped into this Big Ball of Mud article by (another) Jeroen on software (this Jeroen is Jeroen De Dauw).
It is a very nice article with annotations on the (very old, but still very prevalent Big Ball of Mud design pattern of which a lot of software projects suffer).
I didn’t know about the design pattern yet, but have seen it in so many places, and even helped quite a few of them to become less big, and contain less mud. If the article and paper are tool long, you can read a WikiPedia BBM abstract.
I’m glad that the .NET/Delphi based suite of projects I landed on recently – though containing quite a bit of legacy – is different. Still a lot of improvements to be made, but it is very manageable.
–jeroen
Posted in .NET, Delphi, Development, Software Development | Tagged: jeroen | 1 Comment »