Tuesday, March 14, 2017

Viewing Parent of the Task/Bug in TFS Query

You may often require to view the Parent of any Task/Bug in TFS query result. This can be done easily by changing the type of Query to "Work items and direct links" and then setting the filter options as highlighted below.

Of course, it can be modified to different options as required.




Wednesday, March 1, 2017

IIS Keep prompting for the password while using SSL with Windows Authentication

Disable the loopback check (less-recommended method)

The second method is to disable the loopback check by setting the DisableLoopbackCheck registry key.

To set the DisableLoopbackCheck registry key, follow these steps:
  1. Set the DisableStrictNameChecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:

    281308 Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name
  2. Click Start, click Run, type regedit, and then click OK.
  3. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  4. Right-click Lsa, point to New, and then click DWORD Value.
  5. Type DisableLoopbackCheck, and then press ENTER.
  6. Right-click DisableLoopbackCheck, and then click Modify.
  7. In the Value data box, type 1, and then click OK.
  8. Quit Registry Editor, and then restart your computer.

Tuesday, February 21, 2017

How to find the public key token of any dll.

Run following command in PowerShell. 

([system.reflection.assembly]::loadfile("G:\Devlopment\Samples\Azure\WebAPIServiceAuth\TodoListService\bin\System.IdentityModel.Tokens.Jwt.dll")).FullName

Trust IIS Certificate

To configure your computer to trust the IIS Express SSL certificate, begin by opening a Windows Powershell command window as Administrator.
Query your personal certificate store to find the thumbprint of the certificate for CN=localhost:
PS C:\windows\system32> dir Cert:\LocalMachine\My


    Directory: Microsoft.PowerShell.Security\Certificate::LocalMachine\My


Thumbprint                                Subject
----------                                -------
C24798908DA71693C1053F42A462327543B38042  CN=localhost
Next, add the certificate to the Trusted Root store:
PS C:\windows\system32> $cert = (get-item cert:\LocalMachine\My\C24798908DA71693C1053F42A462327543B38042)
PS C:\windows\system32> $store = (get-item cert:\Localmachine\Root)
PS C:\windows\system32> $store.Open("ReadWrite")
PS C:\windows\system32> $store.Add($cert)
PS C:\windows\system32> $store.Close()
You can verify the certificate is in the Trusted Root store by running this command:
PS C:\windows\system32> dir Cert:\LocalMachine\Root

Ref: 
https://azure.microsoft.com/en-us/resources/samples/active-directory-dotnet-native-headless/

Thursday, July 28, 2016

Renew Existing Certificate

https://robindotnet.wordpress.com/2010/01/26/how-to-extend-an-existing-certificate-even-if-it-has-expired/


Tuesday, July 26, 2016

Error trying to publish a web site from VS 2015 to Azure

If you try to publish your web site to Azure using VS 2015, you may face following error.
Can't find existing loaded project:http://localhost:6002

        ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
        ========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

To overcome that error, 
Open VS, go to View --> Other Windows --> Web Publish Activity
Click on Publish icon in there and it should do it. 

Tuesday, July 12, 2016