Cryptographically Secure Pin Generator using RNGCryptoServiceProvider
Use unsigned integers to avoid the Abs related issues
RightPad is incorrect, since shorter integers need leading zeros. Either use LeftPad or simply ToString("D5")
A bigger integer will reduce the bias.


Thus I'd rewrite the relevant code as:

byte[] buffer = new byte[sizeof(UInt64)];
cryptoRng.GetBytes(buffer);
var num = BitConverter.ToUInt64(buffer, 0);
var pin = num % 100000;
return pin.ToString("D5");