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

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...