I've got a JScript assembly that I want to strong name. (This assembly just
allows me to use the JScript eval function from my C# code). I want to be
able to put this JScript assembly into the GAC with the rest of my
assemblies so I need to give it a strong name.
My C# code provides some components/controls for use in ASP.NET web apps, so
they need the APTCA attribute, and as I understand it, I'll need this on my
JScript assembly too. Since this could be a security risk, I want to make
sure only my own assemblies can call my JScript assembly.
I've seen lots of documentation about how to strong name C# assemblies, and
apply the correct attributes, but I don't know how to do it when I compile a
JScript assembly with jsc.exe. What do I need to do?
Thanks
PS: My use of eval is safe - I never evaluate user-entered info. Instead,
I'm evaluating a number of expressions that I have stored in a DataTable
myself. I wanted to avoid writing my own parser, which is why I'm trying
the JScript eval approach.
cpnet - 22 Aug 2004 13:09 GMT
...figured out a way to avoid using a JScript assembly, and avoid parsing
the strings I want to eval. (I can write some code to auto-generate some
appropriate C# classes, that I can compile into my C# assembly - these
classes won't need to be updated unless my other assmeblies are also
updated).
But, I'd still be curious to know if you can (and how to) strong name and
apply security attributes to a JScript assembly.
[MSFT] - 23 Aug 2004 06:40 GMT
When coding with JScript project, we still can specify the AssemblyKeyFile
Attribute, to set a key file. After compiling, the assembly will be a
strong named one:
AssemblyKeyFileAttribute Class
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfSystemReflectionAssemblyKeyFileAttributeClassTopic.asp
Hope this help,
Luke
[MSFT] - 25 Aug 2004 06:23 GMT
Hello,
Did you still have any concern on this issue? If so,please feel free to
post here.
Luke
cpnet - 31 Aug 2004 16:23 GMT
I'm good (I was just on vacation until today) - thanks for the info.