Hi Metrophobe,
If ASP.NET wants to access a store to get an X509 certificate, then
typically that certificate needs to reside in the LocalMachine store, and
not the current user store. Another point to note is that when you want to
perform signing from an app hosted within ASP.NET, then it requires access
to the private key, which by default ASP.NET does not have permissions to
get, unless you do one of two things:
a) Run the ASP.NET account as SYSTEM, or Local System (if using IIS 6)
and not as Machine, or NetworkService (if using IIS 6)
b) Use the WseCertificate tool to open up that certificate (assuming it
is in the LocalMachine store), and click on the Security Tab of that tool.
There you can add either "MachineName\Users" to the list of people who
permissions, or you can add Network Service (if asp.net is running under
network service).
The above assumes that the X509 Cert is in the LocalMachine store, and not
in the CurrentUserStore or in the MyUsername\Personal store. Is there any
reason it has to be in these stores?
Thanks,
Sidd [MSFT]
[quoted text, click to view] "Metrophobe" <jasonmiley@hotmail.com> wrote in message
news:1106673940.859235.174370@c13g2000cwb.googlegroups.com...
> Thanks for your help; unfortunately, I am still stuck. I tried running
> IIS under the ASP.NET account, rather than the standard
> IUSR_MACHINENAME account, but still had no luck. As far as your
> recommendation to give access to the certificate store, I assume that
> you are speaking about the physical location ("C:\Document and
> Settings\...Crypto\..."). Is there some other way (presumably through
> MMC) to give access to the store from a non-physical perspective?
>
> Even if everyone has access to the store, however, I don't see how to
> specifcy the store. My certificate is in the MYUSERNAME\Personal
> store, which I don't think I have access to programmatically. If I am
> coding in .NET, I can access the CurrentUserStore or the
> LocalMachineStore, but I don't see any way to access any kind of
> "OtherUserStore." It appears that the store for MyUsername is
> effectively blocked unless the ASP.NET process is running under that
> account (in which case the MyUsername store becomes the
> CurrentUserStore). It would seem from my testing, though, that even
> then the account still has to be physically logged in before the
> certificate is available.
>
> Can anyone verify what has to happen before the CurrentUserStore for
> "UserA" is available? Is it necessary to run the ASP.NET process under
> that account *and* be logged in?
>