pfx

Waiting on a Task with a OnlyOnFaulted Continuation causes an AggregateException

£可爱£侵袭症+ 提交于 2019-12-02 21:44:05
I have some simple code as a repro: var taskTest = Task.Factory.StartNew(() => { System.Threading.Thread.Sleep(5000); }).ContinueWith((Task t) => { Console.WriteLine("ERR"); }, TaskContinuationOptions.OnlyOnFaulted); try { Task.WaitAll(taskTest); } catch (AggregateException ex) { foreach (var e in ex.InnerExceptions) Console.WriteLine(e.Message + Environment.NewLine + e.StackTrace); } However, I'm getting an unexpected TaskCanceledException being thrown in the try catch block (it's in the AggregateException InnerExceptions object). "A task was canceled". Why am I getting this exception? The

Install a pfx certificate in a users store in Windows using WiX

こ雲淡風輕ζ 提交于 2019-12-02 21:07:08
Please, can someone provide me with a WiX snippet or solution for the mentioned scenario. I need to include the pfx file in the WiX msi and the user will download my msi to his machine via the internet explorer and Click install and I need also the certificate to be installed on his machine. You need the Certificate element . It is part of the IIS extension for wix, but can be used for non-IIS related installations also. You need to declare a prefix for the iis namespace, for example like this in the root Wix element: <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' xmlns:iis='http:/

How to trust a certificate in Windows Powershell

痞子三分冷 提交于 2019-12-01 04:08:18
问题 I am using Windows 7 , and want to run signed scripts from Powershell , the security-settings of Powershell are set to "all-signed" , and my scripts are signed with a valid certificate from my company. I have also added the .pfx-file to my local certificate store (right-clicked the pfx-file and installed) . However, when I start a signed script, I get a message that says: "Do you want to run software from this untrusted publisher? File Z:\Powershell Signed Scripts\signed.ps1 is published by

VSTS Online - Build Solution With ClickOnce Signing PFX Password

假如想象 提交于 2019-12-01 01:33:15
I have a WPF Solution I am building in VSTS Online. Below is my basic Build Definition: In Visual Studio 2017 locally I've assigned a Click Once Certification (PFX). Everything builds and compiles fine locally. The Build fails with the following error: Cannot import the following key file: . The key file may be password protected. To correct this, try to import the certificate again or import the certificate manually into the current user's personal certificate store. What setting/step do I need to include to ensure the PFX file is seen and the password is set? Using this code to import

VSTS Online - Build Solution With ClickOnce Signing PFX Password

风格不统一 提交于 2019-11-30 21:23:02
问题 I have a WPF Solution I am building in VSTS Online. Below is my basic Build Definition: In Visual Studio 2017 locally I've assigned a Click Once Certification (PFX). Everything builds and compiles fine locally. The Build fails with the following error: Cannot import the following key file: . The key file may be password protected. To correct this, try to import the certificate again or import the certificate manually into the current user's personal certificate store. What setting/step do I

PFX/PKCS12 to SNK conversion for mono

萝らか妹 提交于 2019-11-30 20:26:35
This is follow up on Mono xbuild error CS1548 - key file has incorrect format Hi, I have an application that is written in C# using VS2008. At present we are porting this app to Mac using Mono. I have tried to extract the key from the pfx file. First I used `sn -pc key.pfx key.snk` this gave me an error of 'Failed to extract public key for key pair -- Keyset does not exist'. I then used `sn -p key.pfx key.snk` this created the snk file that I wanted. I then in mono selected the project Option > Assembly Signing When built the error 'key.snk is missing private key needed for signing'. I think I

PFX to JKS keytool conversion: Alias <*> does not exist

懵懂的女人 提交于 2019-11-30 19:16:21
I'm trying to convert x.PFX file to x.JKS file using keytool but I am getting following error: keytool error: java.lang.Exception: Alias <2> does not exist Actions that preceded this error are: Listing x.PFX file content (just to read alias name): keytool -v -list -storetype pkcs12 -keystore x.pfx Enter keystore password: x Keystore type: PKCS12 Keystore provider: SunJSSE Your keystore contains 1 entry Alias name: 2 Creation date: 11-nov-2012 Entry type: PrivateKeyEntry Certificate chain length: 3 Certificate[1]: Owner: CN=x, OU=x, C=x Issuer: CN=x, O=x, C=x Serial number: x Valid from: Wed

Convert Certificate and Private Key to .PFX programatically in C#

北慕城南 提交于 2019-11-30 18:53:44
I have a .cer file output from a successful LetsEncrypt certificate request. I have the original Private Key used to create the Certificate Signing Request (CSR) for LetsEncrypt. Now we need to programmatically combine these two files into a PFX bundle for IIS using .NET Since we are trying to to do this programmatically pvk2pfx is not practical, and we would like to avoid openssl if possible. To demonstrate though, we are trying to replicate this function but using CS .NET instead of pvk2pfx: pvk2pfx.exe -pvk Server.pvk -spc Server.cer -pfx Server.pfx I have researched exhaustively and here

How do you install a certificate in a PFX file in to the personal container of the NT-AUTHORITY\\NetworkService?

北战南征 提交于 2019-11-30 17:17:21
I have a .PXF file used to strongly name several of our .NET assemblies. VS2010/MSBUILD seems to expect this to be in the personal container for the user account running VS2010/MSBUILD. This is all just fine and dandy when working in an interactive user account, but when atempting an automated build via TFS 2010 on the build agent the account used by the build agent (by default) is NT-AUTHORITY/NetworkService. Since I cannot log in an interacive session as NetworkService I cant just install the PFX from an interactive sessions shell. So can anyone tell me how I install a PFX certificate in the

Convert Certificate and Private Key to .PFX programmatically in C#

瘦欲@ 提交于 2019-11-30 16:50:09
问题 I have a .cer file output from a successful LetsEncrypt certificate request. I have the original Private Key used to create the Certificate Signing Request (CSR) for LetsEncrypt. Now we need to programmatically combine these two files into a PFX bundle for IIS using .NET Since we are trying to to do this programmatically pvk2pfx is not practical, and we would like to avoid openssl if possible. To demonstrate though, we are trying to replicate this function but using CS .NET instead of pvk2pfx