Jan 4 / kornelius

kornelius.org auf wordpress

Nach einiger Recherche und Ausprobieren, habe ich kornelius.org nun auf wordpress umgestellt.
Wordpress löst somit joomla 1.5 ab. Vorangegangen war ein Versuch mit Drupal, der aber an dem Communitysite-Ansatz von Drupal scheiterte.

Share on Facebook
Jul 2 / kornelius

Emails are not delivered if the body contains single line feeds

The eventlog on our SMTP Server under IIS6 reported the following error very often:

Source: smtpsvc
Category: none
Event ID: 4006
Description: Message delivery to the host ‘xxx.xxx.xxx.xxx’ failed while delivering to the remote domain ‘mydomainname.ext’ for the following reason: The connection was dropped by the remote host.
German: Die Nachrichtenübermittlung an den Host “xxx.xxx.xxx.xxx” ist fehlgeschlagen, während an die Remotedomäne “mydomainname.ext” übermittelt wurde. Ursache: Die Verbindung wurde vom Remotehost getrennt.

The following page brought me to the solution, even if I did not believe in it:


In short: don’t have any bare linefeed chars in the message body. Just replace the \n with \r\n and it should work (be careful if you have both \n and \r\n in the body already).

Share on Facebook
Jul 2 / kornelius

CDATA Section removes all carriage returns

Using some CDATA values in a recent project I noted that the carriage return + line feed was not returned from the xml file using a XmlTextReader.
This turned out to be the expected behavior. That means, all CR and CRLF are replaced to LF.
My source was: http://bytes.com/groups/xml/87719-losing-carriage-returns-cdata-section-how-do-i-prevent

I ended up by replacing all returned values from \n to \r\n.

Share on Facebook
May 8 / kornelius

FileIOPermission failed for assembly with FullTrust Permission Set

After setting fulltrust for an .net assembly to enable it to run from a network share I ran into a figured got into an exception saying:

Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source: mscorlib
StackTrace: at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.IO.DirectoryInfo..ctor(String path)

After trying a while I figured out, that this occures if the code group points to a single assembly. As soon as I pointed it to the whole directory it worked.
This might be because other assemblies are used by the main application.

The call I used to set the code group is
caspol.exe -machine -addgroup LocalIntranet_Zone -url "z:\pathtofile\*" FullTrust -name "mynewcodegroup"

Share on Facebook
Apr 5 / kornelius

Cleaning the asyncoperationbase table in MSCRM 4 pt 3

Microsoft now cares about the problem I posted here:

Just execute the following KB articles in the order posted:


Please note the last action can take quite a while. I changed the row

Select @DeleteRowCount = 2000

to a much higher value

Doing so all workflows etc. are delete right after their (successful) completion. The only thing remaining are matchcode updates. I’ll think about handling them with bulk deletion.

Share on Facebook
Mar 26 / kornelius

VMWare Workstation 6.5 Drag & Drop not working

I had this problem a few times now. After creating a machine or updating to the current version of vmware workstation the drag and drop feature did not work anymore. This is used to put files from physical machine to the virtual and back.
The following post presented the solution:
You just have to set the color quality of the virtual machine from “Medium (16 bit)” colors to “Highest (32 bit)” colors and it works again immediately.

Share on Facebook
Jan 22 / kornelius

Connecting to console session using RDP 6.1

Using the following link, you will see how to connect to a console session (or now called “admin session”) using a saved .rdp file with rdp client version 6.1

RDP 6.1 Client Änderungen connect to console:i:1 wird zu administrative session:i:1

It says, if you used to following in your old rdp-files
connect to console:i:1

you should use the following from now on with version 6.1:
administrative session:i:1

Share on Facebook
Jan 22 / kornelius

Script to add e-mail recipients to your Outlook address book

I used the following vb script to add everybody I send an email to into my outlook address book at work.
The reason for this is, that Oulook does not remember every e-mail address used, so this helps to get autocompletion in the recipient field writing a new mail.
I forgot where I got the original code from, but I left the comment as they were.

In Outlook press Alt + F11 to get into the macroview, then add the code to the Project1 – ThisOutlookSession section.

' sample Outlook 2003 VBA application by Sue Mosher ' send questions/comments to webmaster a outlookcode dot com
' The Application_ItemSend procedure must go in the
'   built-in ThisOutlookSession session module in Outlook VBA
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If Item.Class = olMail Then
        Call AddRecipToContacts(Item)
    End If
    Set Item = Nothing
End Sub

' This procedure can go in any module
Sub AddRecipToContacts(objMail As Outlook.MailItem)
    Dim strFind As String
    Dim strAddress As String
    Dim objNS As Outlook.NameSpace
    Dim colContacts As Outlook.Items
    Dim objContact As Outlook.ContactItem
    Dim objRecip As Outlook.Recipient
    Dim i As Integer
    On Error Resume Next

    ' get Contacts folder and its Items collection
    Set objNS = Application.GetNamespace("MAPI")
    Set colContacts = _

    ' process message recipients
    For Each objRecip In objMail.Recipients
        ' check to see if the recip is already in Contacts
        If objRecip.AddressEntry.Type <> "EX" Then
        strAddress = AddQuote(objRecip.Address)
        For i = 1 To 3
            strFind = "[Email" & i & "Address] = " & _
            Set objContact = colContacts.Find(strFind)
            If Not objContact Is Nothing Then
                Exit For
            End If

        ' if not, add it
        If objContact Is Nothing Then
            Set objContact = _
            With objContact
                Dim RecipName As String
                Dim atPos As Integer
                RecipName = Replace(Replace(objRecip.Name, ".", " "), "_", " ")

                atPos = InStr(RecipName, "@") - 1
                If atPos > -1 Then
                    .FullName = Left(RecipName, atPos)
                    .FullName = RecipName
                End If
                .Email1Address = objRecip.Address
            End With
        End If
        End If
        Set objContact = Nothing

    Set objNS = Nothing
    Set objContact = Nothing
    Set colContacts = Nothing
End Sub

' helper function - put in any module
Function AddQuote(MyText) As String
    AddQuote = Chr(34) & MyText & Chr(34)
End Function
Share on Facebook
Oct 13 / kornelius

Adding Web User Control to aspx page

As you cannot add a web user control to your Visual Studio 2005 toolbox I struggled how to do it the easy way. Here is the solution:

To add a Web user control to a aspx page simple switch to the design view (of the aspx file) and drag the ascx file from the solution explorer onto the page. Visual Studio does the rest for you. No need for you to add the register tag at the top of the page or think of any stuff like that.

Source: http://msdn.microsoft.com/en-us/library/3457w616(VS.80).aspx

Share on Facebook
Sep 15 / kornelius

Using quick parts in Office 2007

A nice feature of office 2007 is the quick parts functionality. I use this in Outlook to insert often used texts into my e-mails.

The only problem is to remove entries off the list. I found an easy article describing a way to do this with Word 2007.

You can find it here: http://www.watchingthenet.com/save-and-reuse-frequently-typed-text-in-outlook-2007-with-quick-parts.html

If you only want to change a quick part, you can just save the changed text using the same name. Outlook will replace the previous one.

Share on Facebook