Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Private Assemblies & Strong Names??

Reply
Thread Tools

Private Assemblies & Strong Names??

 
 
Chris Mohan
Guest
Posts: n/a
 
      07-13-2004
Hi, I've signed a private assembly with a strong name and have deployed it in a web app's bin directory. Things work fine, yet I recently read you "can't" do this:

From: http://msdn.microsoft.com/library/en...l/THCMCh09.asp
"private assemblies... This type of assembly cannot be strong named. Strong named assemblies used by ASP.NET Web applications must be installed in the global assembly cache. This restriction is necessary because of the internal workings of the multi-application domain worker process."

I wonder if this statement is as literal as the wording suggests or if the author is being bombastic. Could it be that the statment really means: "If you want to re-use your assembly in multiple application domains you need to sign it with a strong name and deploy it to the GAC"?

The code in my signed assembly sends email; I'm currenlty calling the class directly, but I'd like to use declarative security in order to only allow an inputValidation class to call it directly.

There are various reasons why I prefer not to install these assemblies in the GAC. Is installing them in the GAC really my only option if I want the assembly to have a strong name(even if I really don't need the strong name)?
 
Reply With Quote
 
 
 
 
Jim Cheshire [MSFT]
Guest
Posts: n/a
 
      07-13-2004
Hi Chris,

In a word, yes. In the current architecture of ASP.NET, strong-named
assemblies are loaded domain neutral. That means that they are not
unloaded until the ASP.NET worker process is unloaded. This can cause
issues with file access because the files remain locked by the process even
when the app domain is unloaded.

In version 1.0 and 1.1, strong-named assemblies are retricted to the GAC
only.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
http://www.velocityreviews.com/forums/(E-Mail Removed)

This post is provided "AS-IS" with no warranties and confers no rights.


--------------------
>Thread-Topic: Private Assemblies & Strong Names??
>thread-index: AcRogC6GKCVSc+YNRg2OuCyxd+/P2Q==
>X-WBNR-Posting-Host: 192.239.90.254
>From: "=?Utf-8?B?Q2hyaXMgTW9oYW4=?=" <(E-Mail Removed)>
>Subject: Private Assemblies & Strong Names??
>Date: Mon, 12 Jul 2004 19:22:01 -0700
>Lines: 10
>Message-ID: <(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.security
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGXA03.phx.gbl
>Xref: cpmsftngxa06.phx.gbl

microsoft.public.dotnet.framework.aspnet.security: 10758
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
>
>Hi, I've signed a private assembly with a strong name and have deployed it

in a web app's bin directory. Things work fine, yet I recently read you
"can't" do this:
>
>From: http://msdn.microsoft.com/library/en...l/THCMCh09.asp
>"private assemblies... This type of assembly cannot be strong named.

Strong named assemblies used by ASP.NET Web applications must be installed
in the global assembly cache. This restriction is necessary because of the
internal workings of the multi-application domain worker process."
>
>I wonder if this statement is as literal as the wording suggests or if the

author is being bombastic. Could it be that the statment really means: "If
you want to re-use your assembly in multiple application domains you need
to sign it with a strong name and deploy it to the GAC"?
>
>The code in my signed assembly sends email; I'm currenlty calling the

class directly, but I'd like to use declarative security in order to only
allow an inputValidation class to call it directly.
>
>There are various reasons why I prefer not to install these assemblies in

the GAC. Is installing them in the GAC really my only option if I want the
assembly to have a strong name(even if I really don't need the strong name)?
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: "Strong typing vs. strong testing" namekuseijin Python 229 10-29-2010 09:02 AM
Re: "Strong typing vs. strong testing" namekuseijin C Programming 214 10-17-2010 01:12 PM
problems with strong named assemblies Dmitry Bond. ASP .Net 1 11-01-2005 08:32 AM
Compilation fails when a windows form user control is assigned a strong name but it refers to an activex control which does not have strong name ashish_gokhale ASP .Net Web Controls 0 05-05-2005 01:38 PM
Strong Names and Web Assemblies Toby Considine ASP .Net Security 3 10-17-2003 05:41 PM



Advertisments