[Mono-list] ASHX Handlers and GAC

Maxim makska at yandex.ru
Mon Nov 15 18:12:10 EST 2010


Hello!

I've found the solution. Sorry for disturbing...

I've removed .ashx files and added to web.config:
<httpHandlers>
<add path="/captcha.ashx" verb="*" type="MySite.captcha, MySite" />
</httpHandlers>

By the way, directive <%@ Assembly Name="MySite" %> in .ashx file don't work.
I'm not sure if it's a mono bug. If yes, I can write test case and file it in 
Bugzilla.

With best wishes,
Max Karavaev


On 11/16/2010 12:43 AM, Maxim wrote:
> Hello!
>
> I've found strange error while using .ashx Handlers from assembly installed into
> GAC.
>
> When I run website with assemblies in /bin folder it works just fine.
> But when I remove bin folder and install dlls into GAC using command "gacutil2
> -i MySite.dll" I get error message like
>
> System.Web.HttpException: Type MySite.captcha not found.
>     at System.Web.UI.SimpleWebHandlerParser.GetTypeFromBin (System.String tname)
> [0x001a0] in
> /usr/src/packages/BUILD/mono-2.8/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs:494
>
> ....
>
> But when I delete .ashx files website works just fine, include aspx-,
> master-pages and asax.
>
> I use the following lines in web.config to load my assembly from GAC:
> <compilation defaultLanguage="c#" debug="false">
> <assemblies><add assembly="MySite" /></assemblies>
> </compilation>
>
> Is it Mono bug or my mistake with configuration?
> It repeats on Mono 2.8 and Mono 2.6.4.
>
> I highly appreciate any help!
>
> All the best,
> Max Karavaev
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>



More information about the Mono-list mailing list