Question : An error occurs while opening the specified store

Hi,
In our website we are using a certificate which was given to us by a bank to use when we do the online payment.
if we run a standalone page/test page which use this certificate, it works fine.  But when we run our website, then we get the error "An error occurs while opening the specified store".  Our website we run as user "selfcare".  Is this something to do with security or permission.

Please help us

Thanks

Answer : An error occurs while opening the specified store

1.Check with the administrator password ainstead of selfcare use then try.
 And also try with the anonomous user
Another method

1. assign ASPNET account used by asp.net with Administrator right
2. modify \Microsoft.NET\Framework\sion>\CONFIG\machine.config
    change to: password="AutoGenerate" />
Here is more infos:
In the RTM version of ASP.NET the ASP.NET worker process runs under a special ASPNET account that has limited priveleges. For impersonation to work the security context must have "Act as part of the operating system" priveleges.  There are a couple workarounds:
1.) Change the userName attribute of the tag in your machine.config file to SYSTEM rather than its default which is MACHINE.
or
2.) Impersonate programatically which is demonstrated in this KB article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306158
I'll bet that your developer machine is running pre-RTM .NET Framework bits or you have already reverted to the SYSTEM account on that machine.

Another
Please see the following information on Impersonation in ASP.NET.
When you want to Impersonate a thread with a user in ASP.NET, you can do that in any of the following ways based on your requirment.
 - Impersonate the IIS Authenticating user
 - Impersonate a Specific user for all the requests on all the pages of an
   ASP.NET application
 - Impersonate the Authenticating user whereever required within the code
 - Impersonate a Specific user whereever required within the code
Impersonate the IIS Authenticating User
---------------------------------------
To Impersonate the IIS Authenticating user on every request for every page
in an
ASP.NET application, you need to have an identity tag in the web.config file of this application and set its impersonate attribute to True.
   
Impersonate a Specific user for all the requests on all the pages of an ASP.NET application
----------------------------------------------------------------------------
---------------
To impersonate a specific user for all the requests on all the pages of an ASP.NET application, you can specify that userName and password in the identity tag of the web.config file for that application as shown below.
   />
Impersonate the Authenticating user whereever required within the code
----------------------------------------------------------------------
When you want to Impersonate the IIS authenticating user only during execution of a piece of code, you can use the following code to perform that. VB
   Dim impCtx as System.Security.Principal.WindowsImpersonationContext()
   impCtx =
System.Security.Principal.WindowsIdentity.GetCurrent.Impersonate()
   'Your code that runs under the security context of the IIS
authenticating user goes here.
   impCtx.Undo()
Random Solutions  
 
programming4us programming4us