strongname

SGEN, InternalsVisibleTo and assembly signing

寵の児 提交于 2019-12-19 04:20:40
问题 I'm trying to do something a bit unusual... I have this class Foo : public class Foo { public Foo(string name) { this.Name = name; } internal Foo() { } public string Name { get; internal set; } public int Age { get; set; } } Notice the internal setter for Name, and the internal default constructor. This would normally prevent the XML serialization, but I also marked the XML serialization assembly as "friend" with InternalsVisibleTo : [assembly: InternalsVisibleTo("TestXML2008.XmlSerializers")

Deserialize object into assembly that is now signed and versioned

我怕爱的太早我们不能终老 提交于 2019-12-18 21:49:12
问题 I used to serialize a treeview with the BinaryFormatter (c#). The Assembly that did just that and which contains the all the serializable classes has now a strong name and is signed and also got a new version number (however, implementation didn't change). When I try to deserialize the byte[] array, the line (TreeViewData)binaryFormatter.Deserialize(memoryStream); produces an ArgumentNullException. (Parametername: type) I thought the versionnumber is the problem, so I implemented an own

.NET: Strong naming vs. Authenticode

血红的双手。 提交于 2019-12-18 14:16:43
问题 Having read about strong names in .NET here, for example, I have the following question: We have an Authenticode code signing certificate with which we sign all our EXE, DLL and MSI files. The benefit of that is that Windows knows the MSI comes from a trusted source, and also that the authenticity of each file can be verified if required. We currently do not use .NET strong names . I have read that strong-naming a file essentially means that it is digitally signed with a self-signed

Do I need to publish the public key from .snk file?

谁都会走 提交于 2019-12-17 16:52:53
问题 From the description of sn.exe utility and this question I see that a copy of the public key is added to every assembly signed with the strong name. This is enough to validate that the assembly binary has not been altered. But how does one verify that given assembly was really signed with some given keypair and compiled by a given company? Anyone could generate his own keypair, produce some assembly and sign it with his keypair. Do I need to publish the public key so that those who want to

How to generate strong-naming SNK key file with .net libraries

左心房为你撑大大i 提交于 2019-12-14 00:46:04
问题 My product needs to be able to generate .snk files (without having Microsoft SDKs installed on the system). I can generate a working SNK file, but I can not seem to get it to work when specifying a password. Can anyone give me some pointers? This is what I have so far: internal static void CreateKeyPairFile(string fileName, int keySize, string password) { if ((keySize % 8) != 0) { throw new CryptographicException("Invalid key size. Valid size is 384 to 16384 mod 8. Default 1024."); }

How to give a .net 1.1 dll a strong name in VS2003

杀马特。学长 韩版系。学妹 提交于 2019-12-13 03:18:29
问题 I have a .net 1.1 dll I need to digitally sign for a legacy project. I have created a .snk file. What steps must I take in Visual Studio to apply the signature? Edit : Found this http://www.robrich.org/archive/2006/11/29.aspx 回答1: Maybe these links will be helpfull: Strong name WinForms 1.1 .NET Framework 1.1 Security Guidelines - Strong Names 回答2: prepare a key file to give strong name **ex: sn.exe -k test.dll test.snk 来源: https://stackoverflow.com/questions/529224/how-to-give-a-net-1-1-dll

Strong name, Manifest, and Code Signing

◇◆丶佛笑我妖孽 提交于 2019-12-12 11:29:37
问题 What order should these be done in? I'm doing this from the command prompt for a .Net app. I was able to do just strong name and code signing successfully, but when I tried all three, it doesn't look like it worked (==> Vista still trying to run the app with elevated privileges resulting in a prompt, though I set the requestedexecutionlevel at asInvoker) Thanks in advance 回答1: Brian, "Vista still trying to run the app with elevated privileges resulting in a prompt" I think the prompt for

Is there anything like GAC in Windows Phone 7?

[亡魂溺海] 提交于 2019-12-11 16:05:44
问题 If not, then how should we handle the assembly version thing? BTW: I can not find a way to strong name sign a WP7 assembly, did I miss anything? 回答1: No, there is no GAC or equivalent in WP7. The GAC is used for sharing versioned assemblies. In Windows Phone 7, each application is completely isolated from all other applications, so there is no need for an assembly sharing facility. 来源: https://stackoverflow.com/questions/6335111/is-there-anything-like-gac-in-windows-phone-7

Strong name signature not valid for this assembly Microsoft.Practices.EnterpriseLibrary.Data.dll

纵然是瞬间 提交于 2019-12-11 10:19:15
问题 I am running windows form application as ClickOnce Deployment. When i debugg the solution i am not getting any error. it's working fine. But, when i publish the application using click once deployment and run the application from folder, i am getting the following error log. Can anyone help me out what exactly the problem is? The Dll's are in assemblies folder in one of the project.And they are used in other project as reference. PLATFORM VERSION INFO Windows : 6.1.7601.65536 (Win32NT) Common

Strong Naming or Authenticode signing a new assembly

落爺英雄遲暮 提交于 2019-12-10 23:05:09
问题 I've been asked by an end user to add "Strong Naming" to one of my components, because they want to reference it from a strong named assembly. I already have an authenticode certificate, so I'm wondering - to make my component usable by their strong named component, is it enough for me to just sign the component with my authenticode key? Or do I have to "strong name sign" the assembly (using Al.exe) for it to be considered "Strong named"? I cannot find any "strong name vrs authenticode"