Re: Strong Names and Referenced assemblies

From: Nicole Calinoiu (calinoiu)
Date: 11/09/04


Date: Tue, 9 Nov 2004 14:09:46 -0500

Alan,

This exception has nothing to do with the strong name. When your run
assemblies (strongly named or not) from outside your local machine, they
will run with restricted code access security permissions. You will need to
adjust your .NET policy configuration to grant your assembly the permissions
it needs to execute from a non-local zone (presumably the intranet zone in
this case). For a description of how to do this, see
http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx.

HTH,
Nicole

"Alan" <Alan@discussions.microsoft.com> wrote in message
news:194D9663-C548-4ED0-B163-AD78BEAFE9C1@microsoft.com...
> Thanks for your help.
>
> It turns out that autoxlimport.dll is dll written in .NET by coworker.
>
> It in turn references the COM dlls: Excel, Microsoft.Office.Core, and
> Office. I now realize that I need to get the tlb type libraries for these
> in
> order to use tlbimp.
>
> Thanks for helping me solve that problem.
>
> But now a new one has arisen:
>
> I built another VB.NET app that has no references whatsoever to any COM
> dlls.
>
> I was able to modify my assmbly.vb to add: <Assembly:
> AssemblyKeyFile("..\..\strongkey.snk")> and it Built and compiled fine
> with
> no errors on our share.
>
> When I run it remotely, I still throw a security exception from my local
> machine.
>
> Alos of note it that I build an msi installation for this VB.NET exe and
> installed this VB.NET exe on my local machine and it runs perfectly on my
> local machine. But this same exception throws an exception from the share
> even with a strong key and a version attribute of "1.0.*".
>
> Anyway to make this "Pure" .NET app with strong key run on my local
> machine
> from the share?
>
> Thanks again!!
>
> Alan
>
>
>
> "Nicole Calinoiu" wrote:
>
>> Is autoxlimport.dll a COM DLL or a .NET DLL? What is the exact error
>> message that is being returned when you run tlbimp.exe?
>>
>>
>> "Alan" <Alan@discussions.microsoft.com> wrote in message
>> news:A02A209C-B41D-4251-9A2F-597B8D8FE38B@microsoft.com...
>> >I need to run my VB.NET exe on a share. I've read many, many postings
>> >about
>> > this and I still need help.
>> >
>> > I created a strong key pair file using sn -k keystrong.snk.
>> >
>> > Then in my assembly.vb, I placed <Assembly:
>> > AssemblyKeyFile("..\..\keystrong.snk")>.
>> >
>> > The problem is that I am referencing interop.crscommon.dll and an
>> > autoxlimport.dll in my app and these referenced guys don't have strong
>> > names.
>> >
>> > Then, for instance, I use tlbimp autoxlimport.dll
>> > /keyfile:keystrong.snk
>> > /out:nufile.dll, and I get an error telling me that the
>> > autoxlimport.dll
>> > is
>> > not a valid file for this.
>> >
>> > What can I do to fix this and finally make my vb.net exe run on a
>> > share?
>> >
>> > Thanks!!!
>>
>>
>>



Relevant Pages

  • Re: (Re)throwing from a catch block across dll boundaries
    ... Thank you for the sample project, I'm able to reproduce the issue you're describing. ... within VS) and found the same results: when I linked both the Dll and the ... I have a function in a dll that throws an exception of type class CEx. ... the application crashes as well ...
    (microsoft.public.windowsce.embedded.vc)
  • Global Assembly Cache Issue
    ... I have a dll that I use in several projects, that I placed in the Global ... you can see in the Exception below). ... If I change the Copy Local property of the reference to True, ... Attempting download of new URL ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: (Re)throwing from a catch block across dll boundaries
    ... If you encounter the problems described in this thread, check your compiler settings and change Code Generation/Runtime Library to 'Multi- threaded Debug DLL ' and 'Multi- threaded DLL '. ... I have a function in a dll that throws an exception of type class CEx. ... the application crashes as well ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: (Re)throwing from a catch block across dll boundaries
    ... when I used the command line parameters you have provided for the dll I ... I have a function in a dll that throws an exception of type class CEx. ... the application crashes as well ... Throw an object of the class from the exported function, ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: (Re)throwing from a catch block across dll boundaries
    ... This unexpected behavior is caused by a limitation of the runtime included in VisualStudio. ... In order to have C++ exceptions work reliably across modules you'd have to use only one copy of the CRT (so linking _all_ the modules with the DLL version of the CRT as you have noticed). ... I have a function in a dll that throws an exception of type class CEx. ... the application crashes as well ...
    (microsoft.public.windowsce.embedded.vc)