views:

2267

answers:

3

hey all,

In my ASP.Net 1.1 application, i've added the following to my Web.Config (within the System.Web tag section):

<httpHandlers>
  <add verb="*" path="*.bcn" type="Internet2008.Beacon.BeaconHandler, Internet2008" />
</httpHandlers>

This works fine, and the HTTPHandler kicks in for files of type .bcn, and does its thing.. however for some reason all ASMX files stop working. Any idea why this would be the case?

Cheers Greg

+1  A: 

It sounds like it as an inherant <clear /> in it although I don't know if I've seen this behaviour before, you could just add the general handler back, let me find you the code.

<add verb="*" path="*.asmx" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services" validate="false">

I think thats the right element, give it a shot.

EDIT: That is odd, I don't have a copy of 2003 on this machine so I can't open a 1.1 but I thought that was the right declaration. You could try adding validate="false" into each element and see if that makes a difference.

Quintin Robinson
A: 

Thanks CQ... but that didn't work - is that the asp.net 1.1 or 2 version? This is a 1.1 app.

There's something kind of strange going on here... without your new asmx handler, when i try to view an asmx page, i get this error:

Parser Error Message: File or assembly name Internet2008, or one of its dependencies, was not found.

Source Error: 

Line 107:    <httpHandlers>    
Line 108:      <add verb="*" path="*.bcn" type="Internet2008.Beacon.BeaconHandler, Internet2008" />    
Line 109:    </httpHandlers>

Even though the handler actually works and does its thing when i load a .bcn file.

BUT, when i add your directive, and try to run the same .bcn code as before, i get the following error:

Parser Error Message: File or assembly name System.Web.Services, or one of its dependencies, was not found.

Source Error:

Line 107:    <httpHandlers>
Line 108:      <add verb="*" path="*.bcn" type="Internet2008.Beacon.BeaconHandler, Internet2008" />
Line 109:      <add verb="*" path="*.asmx" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services" />
Line 110:    </httpHandlers>
Line 111:

The first part is especially weird.. why would the handler work, but then when its not actually being called, it throws an error?

Gregorius
+1  A: 

I got it... CQ you were on the right track.. i did need to add the .asmx handler again, but the .net 1.1 specific one. Final code is as follows:

<httpHandlers>
  <add verb="*" path="*.bcn" type="Internet2008.Beacon.BeaconHandler, Internet2008" validate="false" />
  <add verb="*" path="*.asmx" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
</httpHandlers>

I hope there's no other file types that are not getting handled properly because of this declaration. :|

Thanks for the help greg

Gregorius
Woohoo, okay yeah sorry I didn't have the full path, but i'm really glad you got it working!
Quintin Robinson