Try this:
var resourceName = "SingleSignOn.idsrv3test.pfx";using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)){ TextReader tr = new StreamReader(stream); string fileContents = tr.ReadToEnd();}
Note: Put the file as an embedded resource. file > right click > properties > build action > select embedded resource.