473,395 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

codeBase tag for custom http handler

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>
Nov 19 '05 #1
2 2083
Hi,

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 19 '05 #2
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>
|
|
|

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael Iantosca | last post by:
I have a custom attribute that I attach to certain pages in my application and I want to inspect each page request as it is made to see if the custom attribute is attached to the underlying page...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
6
by: Tabi | last post by:
Hi, I want to create a custom section in my web.config that can hold my custom values. I created a section in web.config as written below. <configSections> <section name="myCustomSection"...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
2
by: Laurent Bugnion | last post by:
Hi, I like to develop custom controls for a number of webpages. These controls are often customizable, so that they can be reused in a number of situations. My question is: What is the best...
2
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
0
by: Jordan S. | last post by:
Using .NET 3.5... in a "plain old" .aspx page I have the following code in the Init event: this.Context.Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.