[Mono-aspnet-list] Authorization tag with deny anonymous users overrides all location tags in Web.config

Alexander M. Batishchev abatishchev at godfather.net.ru
Tue Mar 16 15:29:42 EDT 2010


Hi.
What is current revision?
A bug like yours was fixed in r149264 for 2.4
http://bugzilla.novell.com/show_bug.cgi?id=568441#c1

-----Original Message-----
From: mono-aspnet-list-bounces at lists.ximian.com
[mailto:mono-aspnet-list-bounces at lists.ximian.com] On Behalf Of Oldnavy
Sent: Tuesday, March 16, 2010 6:20 PM
To: mono-aspnet-list at lists.ximian.com
Subject: [Mono-aspnet-list] Authorization tag with deny anonymous users
overrides all location tags in Web.config

Hi,
I have a web app which was recently ported to mono 2.4.3 from earlier
1.1.18. The problem is regarding the web.config file which has the following
format. The Images and styles fails to display when I use the format below.
But when I remove the <deny users="?"/> tag, the images and styles display
properly. I want to deny access to anonymous users but also preserve the
images and styles on login page. How shall I accomplish this?

NOTE: After successful login, the image and styles display properly.

<authentication mode="Forms">
      <forms name=".MONOAUTH" loginUrl="login.aspx" protection="All"
timeout="20"></forms>
</authentication>
<authorization>
      <deny users="?"/>
</authorization>
.
.
<location path="login.aspx" allowOverride="false">
    <system.web>
      <authorization>
        <allow users ="*"/>
      </authorization>
    </system.web>
</location>
<location path="images" allowOverride="false">
    <system.web>
      <authorization>
        <allow users ="?"/>
      </authorization>
    </system.web>
</location>
<location path="Styles/Style.css" allowOverride="false">
    <system.web>
      <authorization>
        <allow users ="?"/>
      </authorization>
    </system.web>
</location>




More information about the Mono-aspnet-list mailing list