-- Michal A. Valasek, Altair Communications, [url]http://www.altaircom.net[/url] Please do not reply to this e-mail, for contact see [url]http://www.rider.cz[/url] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <#zlweBeVDHA.2228@TK2MSFTNGP12.phx.gbl> [ref] => [htmlstate] => on_nl2br [postusername] => Michal A. Valasek [ip] => news@altaircom. [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Basic Forms Authentication question - ASP.NET Security

Basic Forms Authentication question - ASP.NET Security

I can't get this damn thing to work at all. I have a virtual directory set up with anonymous access only, web.config contains the following but when I go to the site it ignores the security and never redirects to login.aspx. I know this will be a stupid problem but please help! <configuration> <system.web> <authentication mode="Forms"> <forms name="ASPXAUTH" loginUrl="login.aspx" protection="All" path="/"/> </authentication> </system.web> </configuration>...

  1. #1

    Default Basic Forms Authentication question

    I can't get this damn thing to work at all.

    I have a virtual directory set up with anonymous access only, web.config
    contains the following but when I go to the site it ignores the security and
    never redirects to login.aspx. I know this will be a stupid problem but
    please help!

    <configuration>

    <system.web>

    <authentication mode="Forms">

    <forms name="ASPXAUTH"

    loginUrl="login.aspx"

    protection="All"

    path="/"/>

    </authentication>

    </system.web>

    </configuration>


    R-D-C Guest

  2. #2

    Default Re: Basic Forms Authentication question

    | I have a virtual directory set up with anonymous access only, web.config
    | contains the following but when I go to the site it ignores the security
    and
    | never redirects to login.aspx. I know this will be a stupid problem but
    | please help!

    you must specify not only authentication, but also the authorization
    conditions. The following web.config example should help:

    <configuration>
    <system.web>
    <!-- here you would setup authentication method -->
    <authentication mode="Forms">
    <forms loginUrl="/Default.aspx" timeout="30" path="/" protection="All"
    />
    </authentication>
    <!--
    now specify authorization for root folder
    '*' means all users, '?' means anonymous users
    the following setting will allow access to all users except anonymous
    -->
    <authorization>
    <deny users="?" />
    <allow users="*" />
    </authorization>
    </system.web>
    <!--
    here we specify different rights for the 'noauth' folder, where
    everyone
    (even anonymous users) has access
    -->
    <location path="noauth">
    <system.web>
    <authorization>
    <allow users="*" />
    </authorization>
    </system.web>
    </location>
    <!--
    here we specify different rights for the 'admin' folder, where only
    members of 'Admins' role can go
    -->
    <location path="admin">
    <system.web>
    <authorization>
    <allow roles="Admins" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>
    </configuration>

    --
    Michal A. Valasek, Altair Communications, [url]http://www.altaircom.net[/url]
    Please do not reply to this e-mail, for contact see [url]http://www.rider.cz[/url]


    Michal A. Valasek Guest

Similar Threads

  1. Basic Forms Authentication Expiration ?
    By Brock Allen in forum ASP.NET Security
    Replies: 0
    Last Post: April 13th, 03:17 PM
  2. Forms Authentication via SSL question
    By Gareth in forum ASP.NET Security
    Replies: 1
    Last Post: May 16th, 07:38 AM
  3. Replies: 3
    Last Post: March 2nd, 12:08 AM
  4. Replies: 4
    Last Post: January 29th, 02:13 AM
  5. ASP.Net Forms authentication with basic authentication popup
    By Brett Porter in forum ASP.NET Security
    Replies: 2
    Last Post: January 20th, 02:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139