KAMACI

I am tying to make these examples;

http://msdn.microsoft.com/msdnmag/issues/07/03/NETSecurity/default.aspx loc=&fig=true#fig3

http://msdn.microsoft.com/msdnmag/issues/07/03/NETSecurity/default.aspx loc=&fig=true#fig5

But i couldn't run my application Sad Errors are :

Error 1 The name 'X509Certificate2UI' does not exist in the current context D:\Test\WindowsApplication1\WindowsApplication1\Form1.cs 65 21 WindowsApplication1

Error 2 The name 'X509SelectionFlag' does not exist in the current context D:\Test\WindowsApplication1\WindowsApplication1\Form1.cs 67 36 WindowsApplication1

Error 3 The name 'X509Certificate2UI' does not exist in the current context D:\Test\WindowsApplication1\WindowsApplication1\Form1.cs 70 17 WindowsApplication1

Error 4 A namespace does not directly contain members such as fields or methods D:\Test\WindowsApplication1\WindowsApplication1\Form1.cs 8 53 WindowsApplication1



Re: Visual C# Express Edition How to Get a Certificate?

rauhanlinnake

Try adding following statement: using System.IdentityModel.Tokens;

And a reference to the library: System.IdentityModel (in system.identitymodel.dll)

Also check the documentation: http://msdn2.microsoft.com/en-us/library/system.identitymodel.tokens.x509securitytoken.aspx




Re: Visual C# Express Edition How to Get a Certificate?

KAMACI

I probably do something wrong.Can you explain me how to add a reference to a library






Re: Visual C# Express Edition How to Get a Certificate?

KAMACI

I found the answer.From the menu bar click Project---->Add Reference after that i found the System.Secutity.dll click OK button redebug the project.Everything is OK! Smile