.NETGURU
Strong name a JScript Assembly
Messages   Related Types
This message was discovered on microsoft.public.dotnet.languages.jscript.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

cpnet
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.

Reply to this message...
 
    
cpnet
....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.

Reply to this message...
 
    
[MSFT] (VIP)
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

Reply to this message...
 
    
[MSFT] (VIP)
Hello,

Did you still have any concern on this issue? If so,please feel free to
post here.

Luke

Reply to this message...
 
    
cpnet
I'm good (I was just on vacation until today) - thanks for the info.

Reply to this message...
 
 
System.Data.DataTable
System.Reflection.AssemblyKeyFileAttribute




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification