Friday, October 3, 2014

How to log yourself off from a remote server from command line on your workstation.

All of this information I got from:
This cool blog

First you must have administrative rights on the machine you are trying to log yourself off of.

You will need to get the SessionId to do that run this command bellow
quser /server:[ServerName]

You will something close to this:
USERNAME  SESSIONNAME  ID  STATE   IDLE TIME  LOGON TIME
[YourId]                2  Disc            3  10/2/2014 12:28 PM


Make a note of the number under the ID column. In this case it is 2.

Next you run the following command using the ID that you got before:
logoff 2 /server:[ServerName]

All done you are logged off.

Tuesday, March 11, 2014

TFS custom enumeration not showing

I have been working with this solution I have 4 projects:
- Project to hold the xaml files
- Project to hold the first level library (contain my custom activities)
- Project to hold Business Layer stuff
- Project to test the Business Layer stuff

Everything was working great.

I had an enumeration that was in the "first level library". It was a parameter in my builds. I noticed a better place for it would be in the Business Layer project instead, so I moved. After I did this I got the following error on my builds:
"Failed to load the following parameters:"

<InArgument x:Key="EnumerationName" x:TypeArguments="enumerationLibrary:EnumerationName" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns=http://schemas.microsoft.com/netfx/2009/xaml/activities">[EnumerationName.DefaultValue]</InArgument>

I would also get the following:

The parameter EnumerationName could not be loaded because the type InArgument<MyNamespace.BLProjectName.EnumerationName> was not found. You cannot edit this parameter, but you can save your build definition without it.

I have already added my TFS folder to the build server's "Version control path custom assemblies" therefore I knew the DLL was in the right place and TFS should see it.

Well then I found this forum entry.

Basically TFS will NOT jump from a xaml workflow file to a DLL that does not have a Activity in it. Since I moved my enumeration to the Business project that project does not have an activity. The solution for this? Add a dummy activity into the project.

Here is an example from Valéry Letroye in the forum above:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.TeamFoundation.Build.Client;
using System.Activities;
 
namespace AG.SCRM.TeamBuild.Helpers
{
 
    //If a custom assembly uses a dependent assembly (reference) which is needed to run activities, 
    //they will not get deployed properly. If this is the case you will get “unknown type” errors on 
    //build definition initialization:
    // TF215097: An error occurred while initializing a build for build definition xxxx: 
    // The type ‘xxxx’ of property ‘xxxx’ could not be resolved.
    //To work around this issue, we add a dummy CodeActivity into the dependent assembly with the
    //class scoped attribute: [BuildActivity(HostEnvironmentOption.All)] 
 
    [BuildActivity(HostEnvironmentOption.All)]
    public sealed class DummyCodeActivity : CodeActivity
    {
        protected override void Execute(CodeActivityContext context)
        {
            throw new NotImplementedException();
        }
    }
}

I did the above and everything started working fine.

God bless,
Bruno

Monday, October 7, 2013

ASPNET user does not have write access to Temporary ASP.NET Files

Issue
Current Identity does not have Write Access to v4.0.30319 Temporary ASP.NET Files

Resolution
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet_regiis.exe -ga domain\user
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_regiis.exe -ga domain\user

Friday, September 13, 2013

Getting the dreaded "silverlight.msi" error on install of Visual Studio 2010 SP1

Found this solution at the MSDN KB (KB2608523).

Create a batch file with the following contents, or just run one line at a time on your command prompt. Remember to start your cmd with Admin privileges by right clicking on it.

reg delete HKLM\Software\Microsoft\Silverlight /f
reg delete HKEY_CLASSES_ROOT\Installer\Products\D7314F9862C648A4DB8BE2A5B47BE100 /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\D7314F9862C648A4DB8BE2A5B47BE100 /f
reg delete HKEY_CLASSES_ROOT\TypeLib\{283C8576-0726-4DBC-9609-3F855162009A} /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\install.exe /f
reg delete HKEY_CLASSES_ROOT\AgControl.AgControl /f
reg delete HKEY_CLASSES_ROOT\AgControl.AgControl.5.1 /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{89F4137D-6C26-4A84-BDB8-2E5A4BB71E00} /f
rmdir /s /q "%ProgramFiles%\Microsoft Silverlight"
rmdir /s /q "%ProgramFiles(x86)%\Microsoft Silverlight"

You will get some errors depending what version of Windows you got (x86 or x64).

After this I re-installed the latest version of Silverlight and all was done.

Friday, July 26, 2013

System.Web.Mobile getting Application_Error throw on .NET 4.0

Just had an strange issue.

User updated ASP.NET page that was created on Visual Studio 2008 to Visual Studio 2010. In the process the project got update to .NET 4.0.

One of the pages was inheriting from System.Web.Mobile, however when we hit this page we would get a message talking about the dll for the System.Web.Mobile was not found or one of its dependencies was not found.

I went inside the project and change it to .NET 3.5 and this fixed the issue.

Now if you need to do .NET 4.0, System.Web.Mobile has been deprecated, so you need to use MVC instead.

Thursday, May 30, 2013

Processor and Memory in Windows 8 System shows "Not Available"

After looking all over the net I found this. It is for Windows Vista, but it does work for the Windows 8 also.

Basically Service account doesn't have enough power to look at the processor and memory. So if you type the following command in a CMD in Administrator mode you can fix this issue.

Step 1 - Press the "Windows" key.
Step 2 - Type "cmd"
Step 3 - Right Click or Long press on the "cmd" application.
Step 4 - On the bottom of the screen you should see "Run as administrator"
Step 5 - On the new command line type in
Net localgroup Administrators Service /add
Step 6 - Restart the machine.
Step 7 - It should be all OK.

Kitematic - Self Signed Certificate In Certificate Chain

Found this issue while behind a enterprise proxy. Proxy uses self signed certificate. Windows has the certificate as trusted, docker works f...