473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to Strong Name

<Sigh> - okay, I have given up on the hashing idea, I guess I am going to
have to break down and figure the sn gooo out. I keep getting this message
when strong naming my assembly (an exe):

Unable to Emit Assembly: Referenced assembly 'Interop.Scripting' does not
have a strong name.

I get the error - that DLL that I am using isn't strong named, but how does
one strong name an exisitng file that I just imported? I did a search for
scripting.dll, hoping it would be about, but no luck.

Can someone assist so I can get this thing to a position where I can run a
fun command like this on it:

caspol -enterprise -addfulltrust appname.exe

???
Thanks,
Derek
Nov 20 '05 #1
9 4255
In article <#a**************@TK2MSFTNGP09.phx.gbl>, dmj2195
@DONTSPAMMEokstate.edu says...
I keep getting this message
when strong naming my assembly (an exe):

Unable to Emit Assembly: Referenced assembly 'Interop.Scripting' does not
have a strong name.
If you want to strong name an assembly, all referenced assemblies must
have strong names too. It's a .NET requirement.
I get the error - that DLL that I am using isn't strong named, but how does
one strong name an exisitng file that I just imported?


If you added a reference to a COM object in VS.NET, it automatically
generates an RCW (Runtime callable wrapper) using tlbimp. However, it
uses basic default options (no signing).

If you want your wrapper signed, you'll need to create the interop
assembly yourself from the command line:

tlbimp file.dll /out:Interop.file.dll /keyfile:mykey.snk

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #2
Hi Patrick, I've tried that, and get this error:
TlbImp error: The input file 'C:\projects\bin\Interop.Scripting.dll' is not
a valid type library

?

"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP************************@msnews.microsoft.c om...
In article <#a**************@TK2MSFTNGP09.phx.gbl>, dmj2195
@DONTSPAMMEokstate.edu says...
I keep getting this message
when strong naming my assembly (an exe):

Unable to Emit Assembly: Referenced assembly 'Interop.Scripting' does not have a strong name.


If you want to strong name an assembly, all referenced assemblies must
have strong names too. It's a .NET requirement.
I get the error - that DLL that I am using isn't strong named, but how does one strong name an exisitng file that I just imported?


If you added a reference to a COM object in VS.NET, it automatically
generates an RCW (Runtime callable wrapper) using tlbimp. However, it
uses basic default options (no signing).

If you want your wrapper signed, you'll need to create the interop
assembly yourself from the command line:

tlbimp file.dll /out:Interop.file.dll /keyfile:mykey.snk

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele

Nov 20 '05 #3
In article <eG**************@TK2MSFTNGP11.phx.gbl>, dmj2195
@DONTSPAMMEokstate.edu says...
Hi Patrick, I've tried that, and get this error:
TlbImp error: The input file 'C:\projects\bin\Interop.Scripting.dll' is not
a valid type library


You need to import the COM library. That looks like the already
converted DLL (the RCW). I think you're looking to import either
"msscript.ocx" or "scrrun.dll" from \WINNT\SYSTEM32.

tblimp C:\winnt\system32\scrrun.dll /out:interop.scripting.dll
/keyfile:mykey.snk

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #4
In article <eD**************@tk2msftngp13.phx.gbl>, dmj2195
@DONTSPAMMEokstate.edu says...
Okay, I see what you are getting at, however, I was able to import the
scrrun.dll file as interop.scripting, but it didn't appear to have the
member I am needing. I have attached what I have been using and perhaps you
can point me at the correct file (or perhaps I am importing it wrong).


What member are you needing? I was just guessing that scrrun.dll was
what you were importing based on the name "interop.scripting.dll".

The DLL attached is a .NET assembly, but it is not strong-named. If you
tell me a bit more about what you're doing I'll try and help you out.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #5
Thank you thank you thank you!
I got it to work after some finagling (sp?)...I forgot that it was a
namespace change on the import, so it wasn't recognizing simply:
scripting.member, I had to go and change those to Interop.Scripting.member -
wahoo!

THANK YOU SO MUCH! Now I can strong name, which, might let me run Network
Based programs :-)

Thank you very, very much Patrick!

Derek

"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP************************@msnews.microsoft.c om...
In article <eD**************@tk2msftngp13.phx.gbl>, dmj2195
@DONTSPAMMEokstate.edu says...
Okay, I see what you are getting at, however, I was able to import the
scrrun.dll file as interop.scripting, but it didn't appear to have the
member I am needing. I have attached what I have been using and perhaps you can point me at the correct file (or perhaps I am importing it wrong).


What member are you needing? I was just guessing that scrrun.dll was
what you were importing based on the name "interop.scripting.dll".

The DLL attached is a .NET assembly, but it is not strong-named. If you
tell me a bit more about what you're doing I'll try and help you out.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele

Nov 20 '05 #6
Okay, if you are willing, I am not quite there yet. Now I am strong named,
I even did the sn -v and it said yippy on the strong name thing. Great, so
I move it into the Share and run this command:
caspol -enterprise -adduflltrust pathtoapp.exe

it says are you sure? I say yes, it says Success....great, but when I go to
run it...this error, STILL!!!!!!

System.Security.Permissions.SecurityPermission error...

Any ideas?
Thanks!
"Derek Martin" <dm*****@DONTSPAMMEokstate.edu> wrote in message
news:Ow**************@TK2MSFTNGP09.phx.gbl...
Thank you thank you thank you!
I got it to work after some finagling (sp?)...I forgot that it was a
namespace change on the import, so it wasn't recognizing simply:
scripting.member, I had to go and change those to Interop.Scripting.member - wahoo!

THANK YOU SO MUCH! Now I can strong name, which, might let me run Network
Based programs :-)

Thank you very, very much Patrick!

Derek

"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP************************@msnews.microsoft.c om...
In article <eD**************@tk2msftngp13.phx.gbl>, dmj2195
@DONTSPAMMEokstate.edu says...
Okay, I see what you are getting at, however, I was able to import the
scrrun.dll file as interop.scripting, but it didn't appear to have the
member I am needing. I have attached what I have been using and
perhaps
you can point me at the correct file (or perhaps I am importing it wrong).


What member are you needing? I was just guessing that scrrun.dll was
what you were importing based on the name "interop.scripting.dll".

The DLL attached is a .NET assembly, but it is not strong-named. If you
tell me a bit more about what you're doing I'll try and help you out.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele


Nov 20 '05 #7
In article <#A**************@tk2msftngp13.phx.gbl>, dmj2195
@DONTSPAMMEokstate.edu says...
I move it into the Share and run this command:
caspol -enterprise -adduflltrust pathtoapp.exe

it says are you sure? I say yes, it says Success....great, but when I go to
run it...this error, STILL!!!!!!

System.Security.Permissions.SecurityPermission error...


I haven't worked much with the command-line caspol tool. I've only
briefly used the "Microsoft .NET Framework 1.1 Configuration" from
Administrative Tools.

In there, you could add a new code group based on the public-key you've
created for your application. Give that code FullTrust permission and
then make sure *no one* get's access to that key file you used to sign
the assembly. Otherwise, they could sign their own malicious code with
your ky and since you've given FullTrust to that key, the code could do
anything it wanted.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #8
Well, here is the problem - this is a deployment to about 250 machines,
running from the share (not locally) and we have to be able to stick
something into their login script (like a command) to add it to the allowed
instance...
???

Derek

"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP***********************@msnews.microsoft.co m...
In article <#A**************@tk2msftngp13.phx.gbl>, dmj2195
@DONTSPAMMEokstate.edu says...
I move it into the Share and run this command:
caspol -enterprise -adduflltrust pathtoapp.exe

it says are you sure? I say yes, it says Success....great, but when I go to run it...this error, STILL!!!!!!

System.Security.Permissions.SecurityPermission error...


I haven't worked much with the command-line caspol tool. I've only
briefly used the "Microsoft .NET Framework 1.1 Configuration" from
Administrative Tools.

In there, you could add a new code group based on the public-key you've
created for your application. Give that code FullTrust permission and
then make sure *no one* get's access to that key file you used to sign
the assembly. Otherwise, they could sign their own malicious code with
your ky and since you've given FullTrust to that key, the code could do
anything it wanted.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele

Nov 20 '05 #9
In article <uO**************@TK2MSFTNGP12.phx.gbl>, dmj2195
@DONTSPAMMEokstate.edu says...
Well, here is the problem - this is a deployment to about 250 machines,
running from the share (not locally) and we have to be able to stick
something into their login script (like a command) to add it to the allowed
instance...


Sorry Derek -- not my area of expertise. This might help:

".NET Framework Enterprise Security Policy Administration and
Deployment"
http://tinyurl.com/8qp3

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mário Sobral | last post by:
Hi, I created an assembly (let's call it assembly (B)) that returns a localized resource for a given key (similar to System.Globalization.ResourceManager). I checks if the caller assembly (let's...
10
by: Tony Jones | last post by:
Can anyone think of a reason why a 3rd party vendor writing .NET components would NOT strong name their assemblies? What harm does adding a strong-name to assembly present - I would think none...
1
by: John E. | last post by:
How can I compile two projects with a circular reference while giving them a strong name? There is a project that we have that has two components that reference each other e.g. A<->B thus...
20
by: Razzie | last post by:
Hey all, I'm really going through a small hell right now - I've completely lost it :) I made a project, using two interop libraries from exchange (created them as in this msdn article:...
6
by: Manuel Lopez | last post by:
Hello, I have a Web Project (UserControls.dll) with some user controls that is shared by many asp.net web applicattions. What we do is copy UserControls.dll to all the applications bin...
5
by: Gopal Krish | last post by:
Hello, Can anyone tell me how to strong name a web page? Thanks Gopal
10
by: Chubbly Geezer | last post by:
I have been working on a VB 2005 DLL which has previously been working. I would create the DLL (reporting.dll), install it, run 'gacutil' and 'regasm' and my Access 2000 DB could see it and use...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
8
by: per9000 | last post by:
Dear readers, I have some problems with strong keys. What I want to do is basically this. A - create an application (f.x. strongHello.dll) with a strong key. B - import the functions of this...
6
by: raylopez99 | last post by:
Anybody use Strong Name Signing? I think this is used by default for Resource files, which is one reason perhaps I can't get my resource files to work (somehow the public key is messed up, perhaps...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.