How to fix 4625: An account failed to log on on Windows Azure VMs

You have probably seen the error below while scanning your Event Viewer in Windows Azure VMs:

An account failed to log on. Continue reading “How to fix 4625: An account failed to log on on Windows Azure VMs”

Advertisements

A template containing a class feature must end with a class feature

If you have had a play with the awesome Code generation tool that you can build yourself:

Walkthrough: Generating Code by using Text Templates

https://msdn.microsoft.com/en-us/library/dd820614.aspx

Then you might have had a small issue with the above error:

A template containing a class feature must end with a class feature

The error is caused by an invisible space after the last #>

It is also important to bear in mind, that invisible spaces may cause other hard-to-understand compile-errors.

If you want to see a bigger picture, just look at following links:

Now that you are aware how harmfull invisible spaces can be when dealing with Text Templates, my advice is: Make them visible. If you don’t know how to do it, see Jeef Widmer’s blog

ESCAPING SPECIAL CHARS IN LDAP SEARCH FILTERS

When programming against any LDAP backend, it’s good to sanitize any user input that may go into a search filter. A typical case is authentication (login or single sing-on) applications, where an input username or email must be used to resolve a user’s distinct name (DN) in the LDAP directory. Continue reading “ESCAPING SPECIAL CHARS IN LDAP SEARCH FILTERS”