Friday, July 22, 2016

Looking up values in Validation Rules

The VLookup function provides the ability to lookup values from other objects.  Note that it ONLY works on Custom Objects.  The format is: VLookup(field_to_return, field_on_lookup_object, lookup_value).

So if you need need to lookup an item from a custom table with an Id of 00Xj000000NK03j, and return the name, the formula would look something like this:  


Tuesday, July 19, 2016

Viewing the ValidationExceptions Collection

Occassionally, .NET apps that are using EntityFramework will throw the following error

System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
The easiest way to see what these exceptions is to add the following to the Watch window:
((System.Data.Entity.Validation.DbEntityValidationException)$exception).EntityValidationErrors


Wednesday, April 13, 2016

Creating an SSL Certificate for Azure App Services


  1. Generate the CSR (Certificate Signing Request).  An easy way to do that is https://www.digicert.com/easy-csr/openssl.htm
  2. Take the output of this page and run it in a Bash shell, or some place that you have access to the OpenSSL library.  This will create a csr file and a key file. 
  3. Buy the certificate.   These guys have good prices: https://www.ssls.com
  4. As part of the checkout, it will ask you to type in the text of the CSR file generated by OpenSSL in Step 2 above. 
  5. Not sure what to select when asked for Apache vs Windows.  But selected Windows, and I got a .cer file.  Support had to send me a .crt file instead. 
  6. After verifying who you are, then will send you a .crt file. 
  7. Use OpenSSL again to convert the .crt file and the .key file to a pfk
    openssl pkcs12 -export -out myserver.pfx -inkey myserver.key -in myserver.crt
  8. Upload the resulting .pfx file to the server.


  9.  


Some of this is taken from: https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure-ssl-certificate/#bkmk_iismgr