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.

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=2.0.0.0, 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“

Cleaning the asyncoperationbase table in MSCRM 4 pt 3

Microsoft now cares about the problem I posted here: http://www.kornelius.org/index.php/blog/2-news/37-cleaning-the-asyncoperationbase-table-in-microsoft-crm-4-part-2 Just execute the following KB articles in the order posted: http://support.microsoft.com/kb/961768/EN-US/ http://support.microsoft.com/kb/957871/EN-US/ http://support.microsoft.com/kb/968755/EN-US/ http://support.microsoft.com/kb/968520/EN-US/ 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.

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: http://blogs.aspguru.ch/stephan/archive/2008/11/26/vmware-workstation-drag-and-drop-problem.aspx 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.

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

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 […]

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

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.

Cleaning the asyncoperationbase table in MSCRM 4 part 2

PLEASE NOTE my update on this on 2009-Apr-05: http://www.kornelius.org/index.php/blog/2-news/43-cleaning-the-asyncoperationbase-table-in-mscrm-4-pt-3 I previously posted about the asyncoperationbase-table in Microsoft Dynamics CRM. In the meantime I found out, that it would take several days with 100% CPU usage on our databases server to get all records deleted with the posted method. So I decided to go into deep and do it myself. I placed the following statements to the database to delete all completed jobs: update AsyncOperationBase set deletionstatecode=2 where deletionstatecode=0 and statecode=3 and AsyncOperationBase.completedon is not null delete from workflowlogbase where AsyncOperationid in (select AsyncOperationid from AsyncOperationBase where deletionstatecode=2) update DuplicateRecordBase set DeletionStateCode=2 where asyncoperationid in (select DuplicateRecordBase.asyncoperationid from DuplicateRecordBase left join asyncoperationbase on (DuplicateRecordBase.asyncoperationid=asyncoperationbase.asyncoperationid and asyncoperationbase.deletionstatecode=0) […]

Managing size of AsyncOperationBase table in CRM 4.0

I found this (http://blogs.msdn.com/crm/archive/2008/07/29/managing-size-of-asyncoperationbase-table-in-crm-4-0.aspx) very interesting article about the size of your MSCRM database. Several GB were present in ours already, mostly because of the AsyncOperationBase table. I had the change the code to get it working on my CRM 4. I remove the part about the operationtype to delete all kind of objects, but left it for this example. Here is the result: QueryExpression expression = new QueryExpression(); expression.EntityName = EntityName.asyncoperation.ToString(); ColumnSet cs=new ColumnSet(); cs.Attributes=new string[] { „asyncoperationid“ }; expression.ColumnSet = cs; ConditionExpression cState = new ConditionExpression(); cState.AttributeName = „statecode“; cState.Operator = ConditionOperator.Equal; cState.Values = new object[1]; cState.Values[0] = (int)AsyncOperationState.Completed; ConditionExpression cCompletedon = new ConditionExpression(); cCompletedon.AttributeName = „completedon“; cCompletedon.Operator = ConditionOperator.OlderThanXMonths; cCompletedon.Values = new […]