Add Bot Framework C# Template to Visual Studio 2015

Hi,

In this post, we’ll see how to add the Microsoft Bot Framework’s template to Visual studio’s New Project dialog.

Follow the below steps to add it to the New Project Dialog.

  1. Download the C# VS template from here. It will be a zip file. Keep the zip file as is.
  2. Open the folder location where Visual Studio looks for User Templates.
    1. You can get the location by navigating to Tools –> Options –> Projects and Solutions –> User Projects Templates location.
      1
  3. Copy the downloaded template into the C# folder. You can choose to paste it directly or create a folder and then paste it into that. Creating a folder will help in having the template in a more organized fashion in the New Project dialog. In this case, I have created another folder Bot Applications and pasted the zip file into it.
    2
    In the image above, you can see the folder I have created and in the bottom part of the image, you can see the zip file that I have pasted into that folder.
  4. Now, close all open instances of Visual studio and reopen VS again. Click on New Project and you should see Bot Application section and the corresponding template added.
    3
  5. You can now create your Bots!

Hope this helps!

Posted in .NET | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

[TFS] Label older code base in TFS branch despite new check-ins

Hi,

Consider a scenario where you need to label a TFS branch at end-of-day everyday and you missed labelling it yesterday and today there are quite a number of check-ins already committed in the branch. How do you label yesterday’s code base then?

TFS provides a very easy way to label branches and solution to above scenario also exists. Follow the below steps to label the older code base.

  1. Right-click the TFS branch to be labelled and click on View History. Note the last changeset number at which you want to label the branch.
  2. Go back to Source Control Explorer and right-click the branch to be labelled. Go to Advanced –> Apply label
  3. In the drop-down, select Changeset and enter the change set number that you noted down earlier.
    Branch_Label
  4. Enter the label name of your choice and then click on create.

Now the TFS branch code base is labelled at the level of the last changeset which we entered. To verify the labelled code, compare the latest version of the code with the labelled code that you just created. There have to be differences and these differences will be that of the check-ins made AFTER the change set noted down above.

Hope this helps!

Posted in .NET, TFS | Tagged , , , , , , , | Leave a comment

Difference between different display modes of SplitView in XAML

Hi,

The below graphic gives a very clear explanation of the differences between types of DisplayModes of SplitView in XAML.

Source : https://www.microsoftvirtualacademy.com/en-US/training-courses/a-developer-s-guide-to-windows-10-12618?l=xYZeMRpRB_6405095281

SplitView display modes

Hope this Helps!

Posted in .NET | Tagged , , , , , , , , , , | Leave a comment

Get password for IIS Application Pool account

Hi,

There are many instances where you have to provide a custom account identity to an App pool in IIS. There are also instances where you might have forgotten the password for that account which has to be set as identity for that Application Pool. In such cases, you can use the APPCMD command to retrieve the password for that user. One thing to remember is that there has to be an app pool existing in the machine already which has been assigned that account’s Identity for us to retrieve it’s password. Please note: This can be used for IIS 7 and above.

APPCMD:

appcmd is an IIS tool used to manage IIS server. It provides many functions that can be used to manager server related activities like create/configure sites, start/recycle/stop app pools, etc.

Retrieve Password of an App Pool identity account:

  1. To retrieve password for an app pool identity account, open the command prompt in administrative mode.
  2. Navigate to C:\System\Windows32\inetsrv directory. This is the location where appcmd.exe exists.
  3. Type the below command and press enter.
    appcmd.exe list apppool <<app_pool_name>> /text:*
    For example: I have an app pool in my IIS named SampleAppPool which has been assigned a particular account’s identity whose password I would like to retrieve. So I would enter the below command in command prompt.

    cmdPress enter and the result will be as shown below. Due to security reasons, I have removed the username and password from the image but trust me, it shows the username and password there.resultHope this helps!
Posted in .NET, General, IIS | Tagged , , , , , | Leave a comment

Installing Windows Identity Foundation Runtime. Resolving Windows Identity Foundation SDK Installation error.

Hi,

I had to install Windows Identity Foundation SDK in a Windows 2012 R2 server for setting up Claims-based authentication. So I downloaded the SDK and started the installation. Immediately I was shown this error popup.

WIF SDK Installation

The cause of the error is apparent – Windows Identity Foundation (WIF, going forward) is not installed in my server.

Solution:

To install WIF runtime, follow the below steps if you’re using Windows Server 2012

  1. Open server manager. Click on Add Roles & features.
    Server Manager
  2. Click Next and navigate till the Features section. If you want to know how to navigate through “Add Roles and Features” dialog box, refer to my post here. Make sure you come back to this post once you reach Features section.
  3. Scroll down and you will find “Windows Identity Foundation”. Select that and click next.
    Note: In your case, it will be unchecked and not disabled and available for selection unlike the one shown here in the screen shot below.
    Windows Identity Foundation feature
  4. Click next and finish the installation.

This will install WIF Runtime in your server. After this is completed, run the SDK setup file again. This time, WIF SDK will get installed without any issues.

To install WIF Runtime on Windows 8, 8.1:

  1. In start menu, type “Turn Windows Features On and Off”. Open the dialog box.
  2. Scroll down and enable Windows Identity Foundation.
  3. Click OK.

This install WIF Runtime in Windows 8, 8.1.

Hope this helps!

Posted in .NET, General | Tagged , , , , , , , , , , , , | Leave a comment