Click here to Skip to main content
15,889,595 members
Home / Discussions / C#
   

C#

 
QuestionHow To Use a C Libray in your C# Program Pin
Andy20219-Apr-11 0:43
Andy20219-Apr-11 0:43 
AnswerRe: How To Use a C Libray in your C# Program Pin
Luc Pattyn19-Apr-11 1:05
sitebuilderLuc Pattyn19-Apr-11 1:05 
AnswerRe: How To Use a C Libray in your C# Program Pin
Rick Shaub19-Apr-11 10:18
Rick Shaub19-Apr-11 10:18 
QuestionHashtable/IDictionary - getHashCode and Equals [modified] Pin
devvvy18-Apr-11 23:34
devvvy18-Apr-11 23:34 
AnswerRe: Hashtable/IDictionary - getHashCode and Equals Pin
David198718-Apr-11 23:56
David198718-Apr-11 23:56 
GeneralRe: Hashtable/IDictionary - getHashCode and Equals Pin
Md. Marufuzzaman19-Apr-11 2:06
professionalMd. Marufuzzaman19-Apr-11 2:06 
AnswerRe: Hashtable/IDictionary - getHashCode and Equals Pin
Luc Pattyn19-Apr-11 0:02
sitebuilderLuc Pattyn19-Apr-11 0:02 
AnswerCORRECTION - Dictionary did throw an ArgumentException if insert two items where Equals returned true Pin
devvvy24-Apr-11 23:43
devvvy24-Apr-11 23:43 
QuestionWhere to Place FullAddress Pin
Anubhava Dimri18-Apr-11 21:24
Anubhava Dimri18-Apr-11 21:24 
AnswerRe: Where to Place FullAddress Pin
Wayne Gaylard18-Apr-11 21:32
professionalWayne Gaylard18-Apr-11 21:32 
AnswerRe: Where to Place FullAddress Pin
Keith Barrow18-Apr-11 22:39
professionalKeith Barrow18-Apr-11 22:39 
GeneralRe: Where to Place FullAddress Pin
Anubhava Dimri18-Apr-11 22:46
Anubhava Dimri18-Apr-11 22:46 
GeneralRe: Where to Place FullAddress Pin
Keith Barrow18-Apr-11 22:57
professionalKeith Barrow18-Apr-11 22:57 
GeneralRe: Where to Place FullAddress Pin
Anubhava Dimri18-Apr-11 23:22
Anubhava Dimri18-Apr-11 23:22 
GeneralRe: Where to Place FullAddress Pin
Dave Kreskowiak19-Apr-11 1:49
mveDave Kreskowiak19-Apr-11 1:49 
GeneralRe: Where to Place FullAddress Pin
Pete O'Hanlon19-Apr-11 2:30
mvePete O'Hanlon19-Apr-11 2:30 
AnswerRe: Where to Place FullAddress Pin
jschell19-Apr-11 8:56
jschell19-Apr-11 8:56 
AnswerRe: Where to Place FullAddress Pin
Prasanta_Prince19-Apr-11 22:52
Prasanta_Prince19-Apr-11 22:52 
Questionwindows service with digital certificate token Pin
piticcotoc18-Apr-11 3:52
piticcotoc18-Apr-11 3:52 
Hy,

I have the following application:
- server application that uses a digital certificate to login to a website; first time i run the app it requires the pin number from the token... certificate is stored on token); i use X509CertificateUI to select the certificate and it pops-up the token client to enter pin number;
- client application connects to my server app and send some data which the server passes to the website to get response and send back to the client.

Everything is working ok. BUT... i want to make it a windows service. (currently is form based). I have done the service part, i installed it, can start it from the service manager, but it doesn't show the certificate selection and the token client for the pin.

here is the server code to get the certificate;
var store = new X509Store("MY", StoreLocation.CurrentUser);
            store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);

            X509Certificate2Collection selection = X509Certificate2UI.SelectFromCollection(store.Certificates,
                                                                                           "Digital Certificates",
                                                                                           "Select a certificate from the following list:",
                                                                                           X509SelectionFlag.
                                                                                               SingleSelection);

After i select it and enter the token pin number it works ok, but haven't been able to do the same as a windows service. I have also exported the certificate into a file from the token and declared a x509cert from local file but it should also require the token pin number.
X509Certificate2 localCert = new X509Certificate2(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\my.cer");
            return localCert;


thanks
AnswerRe: windows service with digital certificate token Pin
#realJSOP18-Apr-11 5:32
mve#realJSOP18-Apr-11 5:32 
GeneralRe: windows service with digital certificate token Pin
piticcotoc18-Apr-11 23:00
piticcotoc18-Apr-11 23:00 
AnswerRe: windows service with digital certificate token Pin
BobJanova18-Apr-11 23:13
BobJanova18-Apr-11 23:13 
GeneralRe: windows service with digital certificate token Pin
piticcotoc18-Apr-11 23:15
piticcotoc18-Apr-11 23:15 
QuestionRe: windows service with digital certificate token Pin
#realJSOP19-Apr-11 3:36
mve#realJSOP19-Apr-11 3:36 
AnswerRe: windows service with digital certificate token Pin
#realJSOP19-Apr-11 3:40
mve#realJSOP19-Apr-11 3:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.