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

Oldnavy abhishekkhare at gmail.com
Tue Mar 16 11:19:42 EDT 2010


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>

-- 
View this message in context: http://n4.nabble.com/Authorization-tag-with-deny-anonymous-users-overrides-all-location-tags-in-Web-config-tp1595043p1595043.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.


More information about the Mono-aspnet-list mailing list