Re: Strong Named Key Files - Deployment
From: Brad Simon (bsimon_at_simondeveloping.com)
Date: 07/15/04
- Next message: Paul Glavich [MVP - ASP.NET]: "Re: Calling distributed serviced component in vb.net - COM+"
- Previous message: Henrik H: "Calling distributed serviced component in vb.net – COM+"
- In reply to: Klaus H. Probst: "Re: Strong Named Key Files - Deployment"
- Next in thread: Klaus H. Probst: "Re: Strong Named Key Files - Deployment"
- Reply: Klaus H. Probst: "Re: Strong Named Key Files - Deployment"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 15 Jul 2004 05:12:57 -0700
Klaus,
This has shed a lot of light on the subject, and raised a couple more questions, I hope I don't sound too stupid, but what is a container, and how do they work? Feel free to send me a URL for this one.
When you say you MIGHT want to deploy the public key, does that mean you don't HAVE to deploy the public key, or does it mean to deploy the public key IF you don't deply the pair? I would rather only deploy the public key, is that still an SNK? I was under the understanding that you have to at least have the public key, and I think that is what you were saying. I am just trying to clarify, so I can get it right from now on.
I know that some posts fall through the cracks, but it seems that some of my most urgent and difficult posts are ignored, it is just an observation.
--
Thanks,
Brad Simon
As you mentioned, for standard (non-web) applications the key normally goes
in the solution directory. That way it is referenced correctly from both
release and debug builds.
For web projects, I usually create the KP using sn.exe, install it into a
container in the local CSP and then use the AssemblyKeyName attribute
instead of a file:
sn.exe -k mywebapp.snk
sn.exe -i mywebapp.snk mywebapp
Then in your AssemblyInfo file (or wherever you have the assembly
attributes) instead of doing this:
[assembly: AssemblyKeyFile("..\\..\\mywebapp.snk")]
do this:
[assembly: AssemblyKeyName("mywebapp")]
It's exactly the same thing. To avoid polluting the CSP storage you should
write down all the keys you install in containers. You can delete them later
with
sn.exe -d mywebapp
if you need to.
No, but you might want to publish your public key. I don't really know what
the MSDN docs say on this - what I know comes from reading crypto stuff. And
besides, I don't use the rinky KPs generated by sn.exe because they're just
for testing =) But basically,
sn.exe -p mywebapp.snk mywebapp.public.key
will give you the public key in the KP. But generally you DO NOT want to
ship your KP along with the app.
There are a lot of people trying to help around here but some will
necessarily fall through the cracks, and sometimes there's simply no one
around with the specific expertise to give you a ready solution.
> --
> Klaus H. Probst, MVP
> http://www.vbbox.com/
>
>
>
- Next message: Paul Glavich [MVP - ASP.NET]: "Re: Calling distributed serviced component in vb.net - COM+"
- Previous message: Henrik H: "Calling distributed serviced component in vb.net – COM+"
- In reply to: Klaus H. Probst: "Re: Strong Named Key Files - Deployment"
- Next in thread: Klaus H. Probst: "Re: Strong Named Key Files - Deployment"
- Reply: Klaus H. Probst: "Re: Strong Named Key Files - Deployment"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|