Monday 12 August 2013

Local Security Authority problem

Ever tried to log in to your remote computer, only to see this error message?
An authentication error has occurred. The Local Security Authority cannot be contacted.

I have my Azure Virtual Machine configured in domain. The Domain Controller and DNS is also an Azure VM. I'm trying to log in with my domain credentials. This error means, that the remote machine cannot access domain controller.
This error often occurs (or rather always and only) after I restarted VM - e.g. to change number of cores or memory.

Solution:

1. Log in to VM using local user, not domain one.
2. Open network and sharing center.
3. Click "Change adapter settings". As you can see, Windows cannot identify your domain.
4. Right-click network card icon, open Properties, double-click "Internet Protocol Version 4".
5. DNS server address disappeared. Set it again.
6. Now, you're back in domain. Log out and log in with domain credentials.

Wednesday 7 August 2013

VPN broke my SharePoint

When I navigated to my SharePoint site, I saw this message:
This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database. To connect this server to the server farm, use the SharePoint Products Configuration Wizard, located on the Start menu in Microsoft SharePoint 2010 Products.
The reason for this was, I installed Cisco VPN on my server in order to be able to access internal network and work with TFS (in 192.168.x.x range).
Unfortunately, SQL Server is on another private network (10.x.x.x range). And as result, it could not be found by SharePoint server.

Disconnecting from VPN solved my problem.

Tuesday 6 August 2013

Always run Visual Studio as administrator

Here I will show how to set Visual Studio to always run as administrator under Windows Server 2012 or Windows 8.

1. Pin VS to taskbar
2. Right click on VS icon

3. Right click on Visual Studio 2012

4.  Select Properties. Go to Compatibility
5.  Select "Run this program as an administrator".