|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problem creating publisher policyluck. My assembly file name is: "myAssembly.Database.NET.dll". I have created a publisher policy file as per the instructions at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcreatingpublisherpolicyfile.asp My policy.config file contains the following: <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="myAssembly.Database.NET" publicKeyToken="db9ad248c0ac0b2a" culture="neutral" /> <!-- Redirecting to version 0.0.0.2 of the assembly. --> <bindingRedirect oldVersion="0.0.0.1" newVersion="0.0.0.2"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration> I have put both version 0.0.0.1 and 0.0.0.2 of myAssembly.Database.NET.dll into the GAC successfully. I have double-checked that the culture and public key token are correct. However, when I try to add my policy ("policy.0.0.myAssembly.Database.NET.dll") to the GAC, I get the following error: "A module specified in the manifest of assembly 'policy.0.0.myAssembly.Database.NET.dll' could not be found. I have run the Pro version of Dotfuscator on both versions of myAssembly.Database.NET.dll, but after obfuscation I have resigned both 0.0.0.1 and 0.0.0.2 with the same key file. (The same key file was also used to produce the policy file). What am I missing - hopefully the fact that my assembly uses multiple 'dots' in the name isn't a problem? BTW, I'm testing this on a fully patched Win2k3 SBS server. Thanks, cpnet grrrrrrr...
I found the problem (an odd one)! Since this assembly was for a web app, I had originally put my updated assembly and policy assembly in my web app's \bin dir. This of course didn't work, and then I read that the policy assembly had to be in the GAC. Since I already had my policy assembly in my \bin dir, and since I was already in the the IIS management console, I selected the "Explore" option for my \bin dir in the IIS console, and dragged and dropped my updated assembly into the GAC (no problem). However, when I tried to do the same with the policy assembly, I got the error message. After a bunch of fiddling, I finally tried dragging an dropping my policy assembly from a regular windows explorer instance into the GAC and it worked fine! So, it seems there's some odd problem with dragging and dropping policy assemblies from the embedded file explorer in IIS to the GAC. With regular assemblies there's no problem!?! If you have the actual Professional Edition, then you should be able to
access the knowledge base articles under Dotfuscator support. I believe they have an article there concerning the publisher policy file. If not, you could call for their support. Hi CPNet,
Glad that you've figured out the problem yourself. As for the problem when draging and droping the assembly in IIS 'S console explorer, I think that must be the different shell behavior of the IIS's console explorer. The windows explorer of the GAC folder ("sysdir:\windows\assembly") has been modified so that we can add or remove assembly in GAC by drag and drop , the IIS console's explorer is not expected to also has the behavior. Anyway, it is always recommended that we use the GACUtil.exe tool when dealing with strong-named assemblies in GAC. Thanks. Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) |
|||||||||||||||||||||||