I have a site that has a home master page. In this masterpage, is a login control and various other hyperlinks to all guest content (about us, contact us, etc). I'm using Forms authentication.
How do I setup the config so that the home page general info links are accessible via all, yet if the user supplies a username/password they are sent to the "protected" area. I'm try the location tags as that seems like it should be what to do. The first location is for the general info, the 2nd location is supposed to be for if the user fires off the login control. It keeps wanting to go to default.aspx (doesn't exist) which seems like it is firing the event in the 1st location..not the 2nd. I'm sure I'm doing something wrong, but if someone has any ideas that'd be great.
Thanks
Here is my config...
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<location path="">
<system.web>
<authentication mode="None"/>
</system.web>
</location>
<location path="~/protected">
<system.web>
<compilation debug="true" strict="false" explicit="true"/>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<authentication mode="Forms">
<forms name="OurCookie" loginUrl="Default2.aspx" defaultUrl="~/protected/SecuredHome.aspx"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>