Tim F
Problem solved, in case anyone is dealing with the same issue.
One thing I didn't mention in my original post was part of the issue. This
was being done within WSS and SPS. Two things seemed to be the problem:
- I was referencing an assembly compiled against the 1.0 framework from
within 1.1. Upon recompiling the assembly in 1.1, it worked in a normal
asp.net/windows app.
- Even after the first step, I was still a generic security error when
running the code within WSS or SPS, even though the the assembly being
referenced was installed in the GAC. The reason, I think, is that WSS/SPS
adds an extra level of security to web parts so that they don't have
unrestricted CAS without explicitly specifying it. Once I installed my new
assembly (that was calling the originally assembly) into the GAC, all worked
fine.
"Tim F" wrote:
[color=blue]
> 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 installed into the GAC.
>
> We originally had this assembly without a strong-name and we were
> successfully using it by referencing it when it was NOT in the GAC. The
> assembly was built using the 1.0 framework and we were able to call it from
> both 1.0 and 1.1 apps.
>
> As soon as we gave the assembly a strong-name and installed into the GAC, we
> got the above error. I deleted all references on my machine to the older,
> unsigned version to make sure there was no conflict, and I added the new
> version to the GAC and added the new reference to it within my project.
>
> BTW - The assembly itself is a modified version of Microsoft's data
> application block. Again, we used it fine for a couple years until we just
> gave it a strong-name.
>
> One other thing/scenario: assume this strong-named assembly is called
> "assembly X". I have a solution that contains two projects, the main
> assembly called "assemby A" and a business logic assembly called "assembly
> B". Assembly B has a reference to this strong-named assembly. When I step
> through the code while debugging, when I get to the a line in Assembly A that
> makes a call to a function in Assembly B (that happens to make a call the
> Assembly X), it won't even let me step into Assembly B to see what
> happens...it will simlpy jump to the catch statement in Assembly A and give a
> simple error: "Security Error". Yet I'm not sure how it could be a
> security error since the strong-named Assembly in question is in the GAC.
>
> Finally, I've also tried taking it out of the GAC and just referencing the
> strong-named assembly by browsing to it. Again, the same problem.
>
> Any ideas? Thanks.
> tf[/color] |