Hi,

We have a web application that references several strong named assemblies.
This application is in a web server that had to replace. We copied the web
application to another web server and registered the latest version of all
the strong named assemblies. When we tried to enter in the application a
binding error was thrown telling us that the assembly with name xx or one of
his dependencies was not found.
But the assembly was installed in the GAC and added as configured assembly
with a binding policy.

What seems to be happening is that .NET is searching the version of the
assembly that is was originally compiled with. So if our application was
compiled with version 1.0.0.0 and later it was updated to 1.0.0.1 it will
search for 1.0.0.0 when searching for dependencies even when you add a
binding policy to the GAC. In the new web server these old version where not
installed so an error was thrown.

We ended up installing all of our versions of the strong named assemblies on
the new web server.

My question is if this is the right way of handling this.
Wouldnâ??t be better that when searching for the dependencies it would look
for the latest version configured in the GAC, so that when you copy to a new
web server you do not have to install al the old versions that are not used.

Is this a bug?

Thanx,

Richard.

Re: copy a project with Configured assemblies by Dirc

Dirc
Wed Oct 19 03:53:42 CDT 2005

Richard Ruben wrote:

> Hi,
>
> We have a web application that references several strong named
> assemblies. This application is in a web server that had to replace.
> We copied the web application to another web server and registered
> the latest version of all the strong named assemblies. When we tried
> to enter in the application a binding error was thrown telling us
> that the assembly with name xx or one of his dependencies was not
> found. But the assembly was installed in the GAC and added as
> configured assembly with a binding policy.
>
> What seems to be happening is that .NET is searching the version of
> the assembly that is was originally compiled with. So if our
> application was compiled with version 1.0.0.0 and later it was
> updated to 1.0.0.1 it will search for 1.0.0.0 when searching for
> dependencies even when you add a binding policy to the GAC. In the
> new web server these old version where not installed so an error was
> thrown.
>
> We ended up installing all of our versions of the strong named
> assemblies on the new web server.
>
> My question is if this is the right way of handling this.
> Wouldnâ??t be better that when searching for the dependencies it
> would look for the latest version configured in the GAC, so that when
> you copy to a new web server you do not have to install al the old
> versions that are not used.
>
> Is this a bug?
>
> Thanx,
>
> Richard.

Well, you would need to create a Policy file which would let assemblies
that use the earlier version to bind to the newer version instead.

--


Re: copy a project with Configured assemblies by RichardRuben

RichardRuben
Wed Oct 19 07:41:08 CDT 2005

I configured me assemblies in the Machine.Config file of the server where i
added a bindingredirect so that it will load the new assambly. But still it
keeps asking for the version of the assembly that is was compiled with.

"Dirc Khan-Evans" wrote:

> Richard Ruben wrote:
>
> > Hi,
> >
> > We have a web application that references several strong named
> > assemblies. This application is in a web server that had to replace.
> > We copied the web application to another web server and registered
> > the latest version of all the strong named assemblies. When we tried
> > to enter in the application a binding error was thrown telling us
> > that the assembly with name xx or one of his dependencies was not
> > found. But the assembly was installed in the GAC and added as
> > configured assembly with a binding policy.
> >
> > What seems to be happening is that .NET is searching the version of
> > the assembly that is was originally compiled with. So if our
> > application was compiled with version 1.0.0.0 and later it was
> > updated to 1.0.0.1 it will search for 1.0.0.0 when searching for
> > dependencies even when you add a binding policy to the GAC. In the
> > new web server these old version where not installed so an error was
> > thrown.
> >
> > We ended up installing all of our versions of the strong named
> > assemblies on the new web server.
> >
> > My question is if this is the right way of handling this.
> > Wouldnâ??t be better that when searching for the dependencies it
> > would look for the latest version configured in the GAC, so that when
> > you copy to a new web server you do not have to install al the old
> > versions that are not used.
> >
> > Is this a bug?
> >
> > Thanx,
> >
> > Richard.
>
> Well, you would need to create a Policy file which would let assemblies
> that use the earlier version to bind to the newer version instead.
>
> --
>
>