Hi BentleyInc,
Welcome to ASPNET newsgroup.
From your description, you're encountering some assembly locating problem
when cofigured to use your custom asp.net httphandler in the asp.net
application under IIS.
As you mentioned that you're using assembly binding's codebase setting,
based on my understanding, the code base is used for specify path for
specific version assembly, and is dependent on version redirecting.
However, the version policy in .net only apply for assembly that has been
specified full identity names,(name, version, culture, keytoken....). Here
is the remark in the MSDN reference of <codebase> setting:
=============
If the assembly has a strong name, the codebase setting can be anywhere on
the local intranet or the Internet. If the assembly is a private assembly,
the codebase setting must be a path relative to the application's directory.
For assemblies without a strong name, version is ignored and the loader
uses the first appearance of <codebase> inside <dependentAssembly>. If
there is an entry in the application configuration file that redirects
binding to another assembly, the redirection will take precedence even if
the assembly version doesn¡¯t match the binding request.
============
So if not full-named(strong-named) assembly, only private sub path under
application dir is used. So the problem again lead to another thing, what's
the application directory of your webapplication, from the url string:
ttp://server/DownloadDir
the applcation dir is the virtual dir under the IIS default site, yes? Is
the virtual directory configured as application or just a normal virtual
directory? If it's a sub application under IIS site, we need to put the
private assemblies in the c:\inetpub\wwwroot\subappdir\bin\ rather than the
site root's private bin path.
And for strong-named assmblies, ASP.NET dosn't support putting in private
bin dir, we need to register all the strong-named assemblies used in
asp.net app into GAC.
Anyway, to got the exact problem on the assembly locating issue, I suggest
you use the fuslogview
#Assembly Binding Log Viewer (Fuslogvw.exe)
http://msdn.microsoft.com/library/en...onlogviewerfus
logvwexe.asp?frame=true
It's very useful for debugging assembly loading issue.
Hope helps. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "BentleyInc" <Be********@online.nospam>
| Subject: codeBase tag for custom http handler
| Date: Mon, 3 Oct 2005 17:08:27 -0400
| Lines: 43
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.181
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181
| Message-ID: <O4*************@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: bsi-uu.bentley.com 64.90.224.40
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:128744
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I wrote a DownloadRequestHandler to be used in
http://server/DownloadDir
and
| I've made the correct IIS settings for DownloadDir.
| Currently I'm having problem loading up some dependent assemblies. Here's
my
| web.config in the physical directory of DownloadDir.
| Class myDownloadRequestHandler loads myRequestHandlers successfully but it
| then complains it couldn't load myLogging. myLogg.dll does exist in
| c:\inetpub\wwwroot\bin\.
|
| Any ideas why it loads the first assembly but not the second one? I've
| removed all the publicKeyToken tags so that it's less restrictive, but
that
| didn't help. I also viewed properties on myLogging.dll and the version is
| 1.0.0.0.
|
| Any suggestions?
| thanks,
| Jingmei
| Bentley Systems Inc.
|
| <configuration>
| <system.web>
| <httpHandlers>
| <add verb="GET" path="*" type="myDownloadRequestHandler,
| myRequestHandlers, Version=1.0.0.0, Culture=neutral" />
| </httpHandlers>
| </system.web>
| <runtime>
| <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
| <dependentAssembly>
| <assemblyIdentity name="myRequestHandlers"
| culture="neutral" />
| <codeBase version="1.0.0.0"
|
href="c:\inetpub\wwwroot\bin\myRequestHandlers.dll "/>
| </dependentAssembly>
| <dependentAssembly>
| <assemblyIdentity name="myLogging"/>
| <codeBase version="1.0.0.0"
| href="c:\inetpub\wwwroot\bin\myLogging.dll"/>
| </dependentAssembly>
| </assemblyBinding>
| </runtime>
| </configuration>
|
|
|