The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

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

    Join 1,828 other subscribers

Archive for the ‘Software Development’ Category

Patch your ASP.NET servers ASAP: ASP.NET Security Update Shipping Thursday, Dec 29th – ScottGu’s Blog

Posted by jpluimers on 2011/12/29

Quotes:

The security update we are releasing resolves a publicly disclosed Denial of Service issue present in all versions of ASP.NET.  We’re currently unaware of any attacks on ASP.NET customers using this exploit, but we strongly encourage customers to deploy the update as soon as possible.

Attacks such as these are not specific to any particular language or operating system. Presenters at the security conference discussed how to cause them using standard HTTP form posts against several different web frameworks (including ASP.NET). Because these attacks on web frameworks can create Denial of Service issues with relatively few HTTP requests, there is a high likelihood of attacks happening using this approach. We strongly encourage customers to deploy the update as soon as possible.

The security update we are releasing on Thursday, December 29th updates ASP.NET so that attackers can no longer perform these attacks. The security update does not require any code or application changes.

During the 28e Chaos Communication Congress in Germany, on December 28, 2011 a security vulnerability was showed that potentially can DOS many types of web servers (including ASP.NET) with a carefully crafted 100 kilobyte plain HTTP form post request.

Information on the ASP.NET vulnerability was published by Microsoft on December 27, 2011.

ASP.NET on all supported .NET versions (1.0 SP3, 1.1 SP1, 2.0 SP2, 3.5 SP1, 4.0) on all supported Windows versions (XP, Server 2003 and R2, Vista, 7, Server 2008 and R2) are affected.

Since the vulnerability as being very severe, Microsoft will publish an out of band fix today (December 29, 2011) at around 10 AM Pacific time (during winter, this 1800 UTC) on Windows Update, Windows Server Update and the Microsoft Download Center followed 3 hours later by a webcast at 01 PM Pacific time (2100 UTC).

More about about 28C3 in German.

–jeroen

via: ASP.NET Security Update Shipping Thursday, Dec 29th – ScottGu’s Blog.

Posted in .NET, ASP.NET, Development, Software Development | 1 Comment »

Get last command line argument in windows batch file – via: Stack Overflow

Posted by jpluimers on 2011/12/29

Sometimes you want to parse commandline arguments in batch files starting at the last one.

For parsing them left to right, the shift command comes in handy.

But there is no “shift-reverse” command, so you need some trick.

StackOverflow to the rescue: user Joey provides this really nice answer:

The easiest and perhaps most reliable way would be to just use cmds own parsing for arguments and shift then until no more are there.Since this destroys the use of %1, etc. you can do it in a subroutine

@echo off
call :lastarg %*
echo Last argument: %LAST_ARG%
goto :eof
:lastarg
set "LAST_ARG=%~1"
shift if not "%~1"=="" goto :lastarg
goto :eof
:eof

–jeroen

via: Get last command line argument in windows batch file – Stack Overflow.

Posted in Batch-Files, Development, Power User, Scripting, Software Development | Leave a Comment »

Added a few links to my “Tools” page, @WordPress bug spuriously inserting div tags still present.

Posted by jpluimers on 2011/12/28

While re-designing a Visual Studio 2010 plus Delphi XE2 install for a specific client, I updated some of my Tools page links:

And found out that the WordPress still wrongly inserts div tags when you step out a list by pressing Enter twice is still present. Annoying, as it has been there for at least 2 years, so I’m still interesting in people having a workaround for it.

–jeroen

Posted in .NET, C#, Delphi, Development, Software Development, TFS (Team Foundation System), Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | 1 Comment »

Applying XE2 Update 3: uninstall IDE Fix Pack first, then apply, then install updated IDE Fix Pack. Also update EurekaLog.

Posted by jpluimers on 2011/12/22

Before installing updates, it is always wise to read the release notes.

In this case, the below quote from the Release Notes for XE2 Update 3 was very important for me, as I use the IDE Fix Pack:

IDE Fix Pack Is Not Compatible with Update 3

The IDE Fix Pack for XE2 is incompatible with XE2 Update 3. If you have the IDE Fix Pack for XE2, you should uninstall the IDE Fix Pack for XE2 before installing Update 3. A revised version of the IDE Fix Pack for XE2 will be made available at http://andy.jgknet.de/fixpack/ .

The cool thing is, on the same day that Delphi XE2 Update 3 got releasedAndy also released the new FixPack 4.6 last week and also explained the cause of the incompatibility.

Note that because of the same reason, more products will need to be updated. EurekaLog also released an update, and I expect more vendors to release updates soon.

Update 3 breaks the monthly release cycle, but for a reason. This update contains way more fixes than the previous ones, in a much wider area and with short turnarounds between reporting and fixing (yes, it does pay to [WayBack] report bugs through QualityCentral). Just [WayBack] read the list of fixes. It is similar to the big updates we used to have for previous Delphi versions.

It also requires a lot more disk space, so make sure you have at least 5 gigabytes of free disk space.

Not related to Update 3, but still nice is that Thomas Müller made available for download the Expertimental GExperts version 1.35-2011-12-18 that is compatible with Delphi XE2. It includes a code formatter that has different bugs than the Delphi XE2 one, but for me usually works better.

–jeroen

via: Release Notes for XE2 Update 3 – RAD Studio XE2.

Posted in Delphi, Delphi x64, Delphi XE2, Development, QC, Software Development | 1 Comment »

svn – How do I move a file or folder from one folder to another in TortoiseSVN? – Stack Overflow

Posted by jpluimers on 2011/12/21

Duh – sometimes simple things are simple, you just have to know how simple: move it using the right mouse click as Mark Embling answers on StackOverflow.

–jeroen

via: svn – How do I move a file or folder from one folder to another in TortoiseSVN? – Stack Overflow.

Posted in Development, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »

Delphi XE2 and iOS: things you should not do

Posted by jpluimers on 2011/12/20

When developing applications for iOS using Delphi XE2, it uses a smart but convoluted FPC detour.

That results in a few things you should take into account when developing iOS applications:

  • Do not use Unit scope identifiers (that’s why for instance the FireMonkey unit FMX.Dialogs is called FMX_Dialogs when building an iOS application)
    So don’t do a “uses System.SysUtils”, but “uses SysUtils” and don’t name your units using Unit scope identifiers for now.
    It would be so nice if Embarcadero shipped the tool that made all the FMX_* units out of the FMX.* units; that alone would make code sharing between non-iOS and iOS applications in Delphi a lot easier.
  • Do not use Generics (though FPC supports them, the FPC mode that Delphi XE2 uses for iOS compatibility does not)
  • Do not use new style RTTI or TValue (they are not supported by FPC)
  • Do not use any other dataset than the ones directly descending from TDataSet (so anything TClientDataSet or IBX like is out) mostly because those depend on external C obj files, Unit scope identifiers or new style RTTI
  • Do not spread your application sources over multiple directories
  • Do not use the TMyDynamicArray.Create shortcut of initializing dynamic arrays, but use a wrapper function that uses Open Array parameters as Rob Kennedy explains on StackOverflow.
  • Do not run dpr2xcode after you have changed any files it generated (believe me, you will change those). This basically makes you have to reinvent most of the dpr2xcode logic, which is a real pain, as I’m still in that process and not completed.
    These are the things you usually want to manually keep track of:
    – most of the manual changes are keeping the “YourProject.dpr” and dpr2xcode generated “YourProject.pas” in sync
    – altering the PNG files to show different splash graphics / application icons

I will extend this list over time.

Note that this detour should be gone in a future Delphi version, but for now you need to take the above into account.

It means that you might feel like programming with one hand behind your back. Well, the Objective C and Xcode way feels very similar, but from a different perspective :)

–jeroen

Posted in Delphi, Delphi XE2, Development, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 2 Comments »

Asphyre Sphinx 2: X-platform game development for Delphi XE2 and/or FPC

Posted by jpluimers on 2011/12/15

Just found out that during my holiday, Asphyre Sphinx 2 was released: a free 2D/3D framework for X-platform game development that comes with full source code.

It is based on FireMonkey supports Delphi XE2 Update 1 and up, and FPC (and yes: it supports on iOS too).

Interesting stuff!

–jeroen

Via: Asphyre Sphinx 2.

Posted in Delphi, Development, Software Development | Leave a Comment »

Overview of .NET Framework, CLR and Visual Studio version numbers – via StackOverflow.com

Posted by jpluimers on 2011/12/14

I love StackOverflow.com; since they clean out duplicate questions very well, it now is becoming a very good site for reference materials as well.

I won’t duplicate the tables of .NET CLR/Framework and Visual Studio version numbers here as it will age: the tables linked below will somehow be updated by someone. The real power of SO.

–jeroen

Via: How do the .NET Framework, CLR and Visual Studio version numbers relate to each other? – Stack Overflow.

Posted in .NET, Development, Power User, Software Development | Leave a Comment »

WinForms UserControl and Visual Studio 2010 debugging – The process cannot access the file … because it is being used by another process – Stack Overflow

Posted by jpluimers on 2011/12/13

When doing WinForms development in Visual Studio 2010 (including SP1), be aware of a bug with UserControls that hamper debugging; sometimes you get an error like this:

Error 9 Unable to copy file "obj\x86\Debug\MyProject.exe" to "bin\Debug\MyProject.exe". The process cannot access the file 'bin\Debug\MyProject.exe' because it is being used by another process.

When using SysInternals’ Process Explorer to see which process has handles open to MyProject, you will see that devenv.exe (The Visual Studio IDE) is the culprit: sometimes it has a lot of handles open.

The workaround is simple: close all UserControls before debugging your WinForms application.

A real pity, as UserControls are a very useful feature when developing software (many platforms use the same paradigm, .NET certainly wasn’t the first to introduce it, and it is available in for instance WPF as well).

Note that there are other causes of the same error message, but for me this was the issue.

–jeroen

Via: visual studio 2010 – VisualStudio2010 Debugging – The process cannot access the file … because it is being used by another process – Stack Overflow.

Posted in .NET, C#, Development, Software Development, VB.NET, Visual Studio 2010, Visual Studio and tools | 2 Comments »

Trouble with Google Reader and GEXperts RSS feed :)

Posted by jpluimers on 2011/12/07

While catching up my feeds after an astonishing holiday around the Antarctic Peninsula (some photos at Flickr), I bumped into a Google Reader issue with the GExperts.com RSS feed: all posts seem to be stamped 20111117T0555.

Funny, as I remember being late to report GExperts 1.35 for Delphi XE2 was released a while a go :)

It reminded me to ask Thomas to publish the XE2 version of his Experimental GExperts build though.

Lets hope he is faster than me catching up :)

--jeroen

via: Google Reader feed for GExperts.org.

Posted in About, Antarctic, Delphi, Development, Personal, Software Development, Travel | 7 Comments »