Monday, July 17, 2017

Convert pfx certificate to base64 string using Powershell



Convert pfx certificate to base64 string using Powershell


Use the below script to convert to pfx certificate to convert to Base64 string using Powershell

$fileContentBytes = get-content 'C:\Temp\DOClientTestCert.pfx' -Encoding Byte

[System.Convert]::ToBase64String($fileContentBytes) | Out-File 'C:\Temp\DOClientTestCert_base64.txt'




Reference :
https://sivapalla.wordpress.com/2016/03/05/convert-pfx-certificate-to-base64-string-using-powershell/

Note: This post directly copy from above link , just to keep a kind of handy document with me , no any intention to copy. If require i can delete it. 

Regards
Kundan

Friday, March 24, 2017

Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'

Problem :


Error : Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'




Solution :


Work Around:


Adding Microsoft.CSharp.dll as a reference fixes the issue








Reference :


https://connect.microsoft.com/VisualStudio/feedback/details/1630573/missing-compiler-required-member-microsoft-csharp-runtimebinder-csharpargumentinfo-create

Wednesday, March 8, 2017

Track Logic App's WorkFlow "Client Tracking ID" inside same Logic App

Problem :  Inside logic App how to track "Client Tracking ID" (it can be consider as co-relation ID which doesn't change when run goes through multiple logic Apps) of the same logicApp

Solution:

Write following line wherever you need to track the Run Identifier

@trigger()['clientTrackingId']
















Thursday, January 12, 2017

Remove BOM from string

Problem: Sometimes due to BOM (Binary object Mark) string couldn't be loaded into XMLDocument etc.


Solution:


Replace string


string str_xml = <xml in string format>
str_xml = str_xml.Replace("\ufeff", "");









Friday, April 22, 2016

User belongs to which windows groups

Problem :



To find the user belongs to which windows groups




Solution:



net user <userName> /domain







Wednesday, September 23, 2015

Visual Studio menu items showing twice/duplicate


Problem Statement:



  • While opening the visual all the menu iteams are show double-double / duplicate.




Solution:



  • Open Visual studio command prompt
  • Run following commands:
Devenv.exe /ResetSettings
Devenv.exe /resetuserdata


Reference :

http://stackoverflow.com/questions/16060832/duplicate-menu-items-vs-2012



Regards
Kundan


Tuesday, July 7, 2015

502.3 - Bad Gateway security error code

Problem Statement:


Whenever you are using IIS ARR with URL Rewrite for Reverse proxy. 
HTTPS to HTTPS. You might receive following error.

Error: IIS 7.5 Detailed Error - 502.3 - Bad Gateway security error code 0x80072f8f



Casue of Problem:


IIS where you configured ARR it doesn't trust the BackEnd IIS Server certificate.


Solution:


Please export the Back End IIS Server certificate and Import it into IIS-ARR local machine under
Trusted Store.

Reference: http://blog.lint.at/iis-as-reverseproxy-with-ssl-offloading/