views:

18

answers:

1

I have an ASP.NET app using Ajaxpro and forms authentication. First I was having trouble trying to avoid passing the ajaxpro handlers through authorization, which was resolved when I included them on separate locations on the web.config:

<location path="ajaxpro/prototype.ashx">
    <system.web>
            <authorization>
                    <allow users="*"/>
            </authorization>
    </system.web>
</location>
<location path="ajaxpro/core.ashx">
    <system.web>
            <authorization>
                    <allow users="*"/>
            </authorization>
    </system.web>
</location>
<location path="ajaxpro/converter.ashx">
    <system.web>
            <authorization>
                    <allow users="*"/>
            </authorization>
    </system.web>
</location>

However, I'm still getting 401 errors when I try to access our AjaxMethods. I event tried to put our types under the following configuration:

<location path="ajaxpro/MyType,MyAssembly.ashx">
    <system.web>
        <authorization>
            <allow  users="*"/>
        </authorization>
    </system.web>
</location>

but that didn't work properly, and I'm still getting 401 responses in some particular cases: I realized that when my requests have some query string values, this setting isn't working.

I wish I could do something like path="ajaxpro/*", but it seems like that is not possible. Does anyone have other ideas?

A: 

You should be able to specify the location with folder name only like this:

 <location path="ajaxpro">
        <system.web>
            <authorization>
                    <allow users="*"/>
            </authorization>
        </system.web>
    </location>
DocV
I did try that, but I still get those 401 when trying to access ajaxpro/Whatever.ashx... maybe because its not a physical folder, but a handler path?
rla4