access only for authorizated/authenticated users, problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hey

asp.net 2.0

I want my website to be available only for authenticated users (except the
front page (Default.aspx) which all users can view). If an anonymous user
tryes to access other pages than the default.aspx, then the user should be
redirected to AccessDenied.aspx.. There is the problem. I tested as a
unauthenitcated user and clicked on the menu item, instead of redirecting me
to AccessDenied.aspx I was redirected to Default2.aspx page... Default2.aspx
is the url in the menu item (see part of my web.sitemap below)

Below are some of my web.config settings:

I have a web portal which I want only to be accessible by authorizated
users. So I added these settings to web.config:
<authorization>
<allow users="*"/>
<deny users="?" />
</authorization>

<authentication mode="Forms">
<forms cookieless="AutoDetect"
loginUrl="~/AccessDenied.aspx"
name="TBHFORMAUTH" />
</authentication>

But I want the default.aspx page to be viewable for all users so I added
this setting:
<location path="default.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>

web.sitemap:
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="~/Default2.aspx" title="My Profile" description="" >
.....

Any ideas how I should solve this problem?

Best Regards!

Jeff



.



Relevant Pages

  • Re: IE Maintenance settings stopped working since XP SP2
    ... I don't think this is related to the desktop wallpaper. ... create a test user with app data redirection turned off and see. ... policy settings to see if there's some kind of conflict. ... > Not sure not redirecting application data is an option with many students ...
    (microsoft.public.win2000.group_policy)
  • Re: ASP.NET Authentication exception case
    ... > This section sets the authorization policies of the application. ... > particular session. ... > If cookies are not available, a session can be tracked by adding a session ... > This section sets the globalization settings of the application. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Internet Explorer Maintenance Settings
    ... We also just began redirecting application data over ... hence the recent problems of the settings not being applied. ... > Are the client machines Windows XP SP2? ... > 306915 Internet Explorer Maintenance Group Policies Do Not Apply During ...
    (microsoft.public.win2000.group_policy)
  • RE: Restrict pages
    ... As for the setting authorization restriction for individual or certain ... you can consider using the configuration element ... which can help configure some particular settings for a certain path (such ... Also, for windows or SQL authentication, we would have to configure ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • web.config configuration issue
    ... I have an asp.net web site. ... I have set up on the web server). ... In the web.config file I have used these settings: ...
    (microsoft.public.dotnet.security)