Microsoft
Software
Hardware
Network
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\Fram
ework\
sion>\CONF
IG\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.c
om/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.
WindowsImp
ersonation
Context()
impCtx =
System.Security.Principal.
WindowsIde
ntity.GetC
urrent.Imp
ersonate()
'Your code that runs under the security context of the IIS
authenticating user goes here.
impCtx.Undo()
Random Solutions
Linux init script, bash, exporting variable and accessing as another user?
VPN - help!
NavigatetoURL problem with Javascript call
Trouble with *.ccx graphic conversion
Several users receive duplicate emails in Outlook 2003
Using E4X to Parse XML data
Server 2003, Backup Exec 10d crashes during backup.
Can I mirror two exchange servers in different sites so they both have same mailboxes?
Exchange cluster 2003 SP2 : SMTP Virtual server Instance 1 : The ISAlive check for this resource failed
How to log network administrator's actions, such as change FW rules, On PIX525 and ASA5520?