468,268 Members | 1,978 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,268 developers. It's quick & easy.

GAC'd library not loading due to different versions of .NET

Trick Or Treat!

I have a web server setup to host both .NET 1.1 and .NET 2.0 web
applications. The applications are isolated by virutal directories
(VirtDir1 points to C:\Inetpub\wwwroot\app1, VirtDir2 points to C:
\Inetpub\wwwroot\app2, etc). The ASP.NET property for each virtual
directory is set to 1.1.4322 or 2.0.5xxxx based on which version the
application was build with.
Everything works fine...there is peace and harmony between
applications until....

I created using (VS 2005 - .NET 2.0) an HTTP Module in a .dll. Once
created, I created a strong name and associated the .dll with it. On
the server, I installed the .dll in the GAC. I then added a web.config
file in the website root directory (c:\Inetpub\wwwroot) which
identifies the HTTP Module, so that all .NET applications will
automatically use the module. My .NET 2.0 applications pick up the
module correctly and I get the expected the result. The 1.1
applications do not work correctly - I am given the error message

An error occurred during the processing of a configuration file
required to service this request. Please review the specific error
details below and modify your configuration file appropriately.

and, to paraphrase, it tells me that the dll (assembly) (or one of
its assemblies) holding the module cannot be found.
It appears that since the application was built using the 1.1
libraries, only .NET 1.1 libraries will be included in resolving
external assembly references. Is this assumption correct? If so, how
do I remedy this?

Thanks in advance

DotNet Dude

Oct 31 '07 #1
3 1723
net applications are loaded into an appdomain. only one version of an
assembly can loaded at time. if the appdomain is running 1.1 vm, an
attempt to load a 2.0 assembly will fail, as it has dependencies on
routines n the 2.0 clr.

you have two options.

1) create your httpmodule in 1.1 for it can be hosted by either enviroment.

2) convert all vdirs to 2.0. in most cases 2.0 vdirs can run 1.1
assemblies without a recompile.
-- bruce (sqlwork.com)

do***************@gmail.com wrote:
Trick Or Treat!

I have a web server setup to host both .NET 1.1 and .NET 2.0 web
applications. The applications are isolated by virutal directories
(VirtDir1 points to C:\Inetpub\wwwroot\app1, VirtDir2 points to C:
\Inetpub\wwwroot\app2, etc). The ASP.NET property for each virtual
directory is set to 1.1.4322 or 2.0.5xxxx based on which version the
application was build with.
Everything works fine...there is peace and harmony between
applications until....

I created using (VS 2005 - .NET 2.0) an HTTP Module in a .dll. Once
created, I created a strong name and associated the .dll with it. On
the server, I installed the .dll in the GAC. I then added a web.config
file in the website root directory (c:\Inetpub\wwwroot) which
identifies the HTTP Module, so that all .NET applications will
automatically use the module. My .NET 2.0 applications pick up the
module correctly and I get the expected the result. The 1.1
applications do not work correctly - I am given the error message

An error occurred during the processing of a configuration file
required to service this request. Please review the specific error
details below and modify your configuration file appropriately.

and, to paraphrase, it tells me that the dll (assembly) (or one of
its assemblies) holding the module cannot be found.
It appears that since the application was built using the 1.1
libraries, only .NET 1.1 libraries will be included in resolving
external assembly references. Is this assumption correct? If so, how
do I remedy this?

Thanks in advance

DotNet Dude
Oct 31 '07 #2
On Oct 31, 11:38 am, bruce barker <nos...@nospam.comwrote:
net applications are loaded into an appdomain. only one version of an
assembly can loaded at time. if the appdomain is running 1.1 vm, an
attempt to load a 2.0 assembly will fail, as it has dependencies on
routines n the 2.0 clr.

you have two options.

1) create your httpmodule in 1.1 for it can be hosted by either enviroment.

2) convert all vdirs to 2.0. in most cases 2.0 vdirs can run 1.1
assemblies without a recompile.

-- bruce (sqlwork.com)

downloads4bird...@gmail.com wrote:
Trick Or Treat!
I have a web server setup to host both .NET 1.1 and .NET 2.0 web
applications. The applications are isolated by virutal directories
(VirtDir1 points to C:\Inetpub\wwwroot\app1, VirtDir2 points to C:
\Inetpub\wwwroot\app2, etc). The ASP.NET property for each virtual
directory is set to 1.1.4322 or 2.0.5xxxx based on which version the
application was build with.
Everything works fine...there is peace and harmony between
applications until....
I created using (VS 2005 - .NET 2.0) an HTTP Module in a .dll. Once
created, I created a strong name and associated the .dll with it. On
the server, I installed the .dll in the GAC. I then added a web.config
file in the website root directory (c:\Inetpub\wwwroot) which
identifies the HTTP Module, so that all .NET applications will
automatically use the module. My .NET 2.0 applications pick up the
module correctly and I get the expected the result. The 1.1
applications do not work correctly - I am given the error message
An error occurred during the processing of a configuration file
required to service this request. Please review the specific error
details below and modify your configuration file appropriately.
and, to paraphrase, it tells me that the dll (assembly) (or one of
its assemblies) holding the module cannot be found.
It appears that since the application was built using the 1.1
libraries, only .NET 1.1 libraries will be included in resolving
external assembly references. Is this assumption correct? If so, how
do I remedy this?
Thanks in advance
DotNet Dude- Hide quoted text -

- Show quoted text -
Bruce -

Thanks for the response.

I tried solution #2 and it seemed to work.

For solution #1, if I re-create the HttpModule in version 1.1, won't I
have the same issues with my 2.0 applications - since they would be a
"2.0 app domain" and wouldn't be able to see the 1.1 library. Or, do
you mean have 1.1 and 2.0 versions of the HttpModule co-exist in the
GAC. Would I need a different strong name for each version of the
library or not?

Oct 31 '07 #3
As Bruce indicated, 1.1 assemblies normally load and are executed in the 2.0
App Pool with no issues.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

For solution #1, if I re-create the HttpModule in version 1.1, won't I
have the same issues with my 2.0 applications - since they would be a
"2.0 app domain" and wouldn't be able to see the 1.1 library. Or, do
you mean have 1.1 and 2.0 versions of the HttpModule co-exist in the
GAC. Would I need a different strong name for each version of the
library or not?
Oct 31 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

GAC
4 posts views Thread by Phil | last post: by
6 posts views Thread by Jim Butler | last post: by
4 posts views Thread by Arnaud Debaene | last post: by
4 posts views Thread by Bonj | last post: by
2 posts views Thread by julien | last post: by
3 posts views Thread by Sabarish | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.