views:

550

answers:

1

Ok, so i know how to strong name an assembly and regasm it, so I can access it from a an ASP page.

By strong naming it, it can be placed in the GAC and thus be easily accessible from an ASP page.

Is it possible to somehow register the assembly without signing it with a strong name and still be able, somehow to access it from the ASP page? I want to do this because we want this .net assembly to be able to reference non-signed assemblies and not be as dependant when updating its referenced assemblies.

+1  A: 

You call regasm with the /codebase parameter:

> regasm.exe /codebase path_to_dll\yourdll.dll

Edit: Sorry this is wrong...
Just saw in the documentation that your dll has to be strong-named as well :s
But you don't have to put it in the GAC!
I don't think you can export a .Net library as COM objects without strong-naming it.

BUT (see the comments): Apparently the documentation is wrong, as people have done this without strong-naming (I personally haven't as all our com-exposed assemblies are strong-named).

fretje
In version 1.0 and 1.1 there was absolutely no strong name requirement, as I've done this quite a bit. The regasm tool gave a warning only but worked correctly. The docs you sent a link to were for 1.1, so I think the docs are wrong.
Adam Sills
(...as long as you used /codebase)
Adam Sills
(...although I always used /codebase pointed to the DLL in my web application's /bin directory)
Adam Sills
The documentation is wrong. /codebase is enough to get to work. We use this technique for writing add-ins to various products that don't supply strong-named assemblies for our consumption, thereby disallowing us to strong-name our own assembly.
Joel Lucsy
It worked - i did a /codebase /regfile and manually ran the .reg file to make it work. I tried different aproaches (i really don't understand why i needed to create/run the .reg file as /codebase was supposed to take care of that)
Per Hornshøj-Schierbeck