Re: Forms Authentication

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



On Apr 4, 12:02 pm, m.ow...@xxxxxxxxxxx wrote:
Hi,

I am new to the concept of asp.net authentication so this might be
obvious. Im working on an application writtten by my predecessor,
which has login page. This is authenticated against credentials in a
database. If the user is an administrator, the user is forwarded to a
management console. If the user is a standard user then the user is
forwarded to the user console.

The problem is, when logged in there's nothing to stop the user
(logged in as a standard user) modifying the URL in the browser window
and navigating to the administrator area of the website.

Whats the best way of getting around this? Can I assign roles to the
users (in the cookie) and use the web.config file to interrogate these
credentials and allow / deny access?

Thanks in advance
Matt

There are two standard ways to authorize users in your case: URL
authorization and roles. With URL authorization, you can allow or deny
access to a particular link by user name.

<location path="admin.aspx">
<authorization>
<allow users="admin,superadmin"/>
<deny users="*"/>
</authorization>
</location>

Role based authorization lets you assign a users to roles. You can
either use "allow roles", "deny roles" in a web.config, or configure
access in the code using the User.IsInRole() function

if (User.IsInRole("admin")) {
Response.Redirect("admin.aspx")
}

.



Relevant Pages

  • RE: Getting forms auth challenge
    ... You need to change your <authorization> section as follows: ... Microsoft Developer Support ... >though still doing windows authentication. ... You can allow or deny access ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • asp.net vulnerability
    ... From: Windows NTBugtraq Mailing List ... More details on ASP.NET vulnerability ... There has been some confusion with the ASP.NET forms authentication issue ... authorization issue, not an authentication issue. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: application pool custom identity
    ... Kerberos becomes a possibility when the web server is in a Domain, ... The problem happens when the browser/server selects Kerberos authentication, ... LocalSystem credentials will work for Kerberos; custom AppPool Identity ... Authorization. ...
    (microsoft.public.inetserver.iis)
  • Re: Kerberos OpenLDAP Frontend
    ... Jonathan Javier Cordoba Gonzalez wrote: ... but then you are mixing the authentication with the authorization. ... A KDC with passwords and LDAP ...
    (comp.protocols.kerberos)
  • Re: ASP.NET Authentication exception case
    ... It doesn't seem to like the authorization tag underneath the location tag ... This section sets the authentication policies of the application. ... <!-- SESSION STATE SETTINGS ...
    (microsoft.public.dotnet.languages.csharp)