Posts

Azure VM LIcensing Error

When you log in to the Windows Azure VM, you may receive a popup that says you need to configure the licensing server. If you don't configure the licensing server, you only have X days left of access. You need to sign in to the Azure portal, download the RDP file for that virtual server, and only access the VM from that RDP.  The RDP file has access to the server, even after the licensing server grace period ends.

Umbraco CMS Refresh

U mbraco is an Asp.Net based Content Management System. It has many pieces and configuration elements. Recycle/Refresh While I have been working on the Merchello Package, I've learned some ways to cycle Umbraco if something isn't working right. Touch Web.Config Reindex Examine Indexes via Back Office Delete files in \App_Data\Temp Republish content node or entire content tree. 

Parsing Word Document XML via MsXml in VBA

Image
An old friend ping me because while having some success loading word documents saved as xml in his VBA routines in word, he was having massive problems getting XPATH to work. I resolved the basic issue and then asked him to give me his hardest issue for me to show some example code for. I think that the last time that I did this was a few years ago, MsXml was (and is) a bit lame compared to later implementations, so his troubles were very reasonable to have.   Declaring name spaces You can’t use XPath on a document with namespaces without providing the name spaces. The process is pretty simple, just convert the namespaces declare at the top of the XML document to a VB String. There happen to be many of them in a word xml document..   Dim domPrefix As String domPrefix = "xmlns:wpc='http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas' " domPrefix = domPrefix + "xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006...

Merging two AspNet Profiles–more complex then one would think!

During recent code revision, a developer accidentally removed in Web.Config, the applicationName on the SQLProfileProvider element. The consequence became apparent when support started to report customers saved-reports-definitions(which was stored here) had disappeared. < add name ="ErrorProfileProvider" connectionStringName ="LocalSQLServer" type ="System.Web.Profile.SqlProfileProvider" /> The problem was identified, but there was a second problem… We had a significant number of new customers that also saved reports-definitions to this error profile provider. A simple switch back by adding the applicationName would mean that these reports-definitions would disappear (which customer support did not want to see happen to new customers – a rather bad experience). My initial take was “Oh, I have used multiple membership providers in one web application in the past, so we just need to use the same pattern…” Oops that pattern did not w...

Converting SalesForce SOQL results to a Linked Dataset for use by C#

Image
In my last post, I illustrated the 'simple' way of getting the data back - by just creating a Xml Document from the results. This is not always efficient -- in fact, I have gotten out of system memory errors on some queries. In this post I will take the same query and show a little slight of code. The query was: SELECT Name,    (SELECT Name, Email FROM Contacts),    (SELECT CaseNumber, CreatedDate, Subject, Status, Resolution__c,  ClosedDate, SuppliedEmail,SuppliedName FROM Cases    WHERE CreatedDate = LAST_N_DAYS:366     AND Origin != 'Internal'     AND OwnerId !=     '00G40000001RTyyEAG'     AND RecordTypeId IN ('01240000000UTWP', '01240000000UWxM', '01240000000UWxl', '01240000000UWxb')   )   FROM Account    WHERE ID IN (SELECT AccountId FROM Contact Where Email in ({0})) Extension Method to Handle SOQL Result Columns The code ...

Handing Salesforce SOQL Relationship aka Joins in C#

Image
Salesforce SOQL is not SQL which often causes great frustrations to experienced database developers when they work with it. Being of the generation that worked with Network Data Models and Hierarchical Data Model  - i.e. pre-Relational Databases! (as well as database on Tape!), I actually find a lot of "familiar tones" in SOQL. Recently I was needing to build a query that in SQL would be: SELECT Account.Name AS AccountName,    Contact.Name, Contact.Email,    Case.CaseNumber, Case.CreatedDate, Case.Subject, Case.Status, Case.Resolution__c,  Case.ClosedDate, Case.SuppliedEmail,      Case.SuppliedName   FROM Account  JOIN Case ON ... JOIN Contact ON ....  WHERE Contact.Email in ({0})   AND Case.CreatedDate = LAST_N_DAYS:366     AND Case.Origin != 'Internal'     AND Case.OwnerId !=     '00G40000001RTyyEAG'     AND Case.RecordTypeId IN ('0124000000...

Doing Tests and Unit Tests of AspForm Web Applications: Setup

Image
This is the beginning of a series of post dealing with AspForm unit tests. We have two options for running Unit Tests. Both have advantages and disadvantages. Running Unit Tests Against your local development Box Running Unit Tests Against a Development Server Gotcha of this approach Recommended Approach Running Unit Tests Against your local development Box A test would be written as shown below This will produce a result such as To have the test work we MUST configure IIS to provide the appropriate site, for example on 666 Check list: Physical Path is pointing to the image you wish to test IIS port and path are matching IIS Server is running Running Unit Tests Against a Development Server Note: You need to STOP the above server for the following to work. Our test is now written as: The  AspNetDevelopmentServerHost must be pointing at the source folder you wish to test. We must now change the Web Application project to be found and ...