Certificates Dialog Box Issue in ASP .Net Application with .Net 2.0

May 9, 2007 at 7:16 AM
Hi, I'm new to web development and .net 2.0. I am working on a project related to the encryption and using certificates. When I run the Visual Studio 2005 using ASP.NET X509Certificate2UI, it is working fine. That means Certificate dialog box come up. I am using local connection (http://localhost) when it works.
As soon as I start using the IIS web server connections (http://Servername/), then it fails. Error message I get is “The current session is not interactive”. It can not pull the list of the certificates and display Certificate dialog box . I have tried to find a sample code about this and I couldn't. From the microfost link (http://msdn.microsoft.com/msdnmag/issues/07/03/NETSecurity/ ) I found an explanation on how to use the certificates and it is below. "There is also a machine-wide store, which is used by the Windows machine accounts (NETWORK, LOCAL SERVICE, and LOCAL SYSTEM) or if you want to share certificates or keys across accounts. ASP.NET applications always use the machine store; for desktop applications, you typically install certificates in the user store." In other words, I applied machine accounts and still having the same error message. Any help on this issue is greatly appreciated. Thanks. Regards

May 10, 2007 at 1:58 AM
Hi, I fixed this problem by finding the certificate and posting it instead of choosing it manually from the window. I used
store.Certificates.Find(X509FindType.FindBySubjectDistinguishedName, AuthorityName, false)

Once the ceritificate was found, I was able to use the web services to process it. As suggested in the article above, I have used machine-wide store instead of the user store. Thanks.