ASP.net Authentication question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Simon Harvey (simon.harvey_at_the-web-works.co.uk)
Date: 03/23/04


Date: Tue, 23 Mar 2004 11:30:35 -0000

Hi everyone,

I'm hoping that someone can help me with the following:

I don't know to much about asp.net security, but I've copied the following
code out of one of microsofts security books. What I'm trying to achieve is
allow a user access to a secured directory only once his details have been
validated. The directory in question "/secure/" is specified in a location
element of the web.config file. The code in question is in my login page and
is:

 if(SystemUserLogic.validateUser(username, password)){

  authTicket = new FormsAuthenticationTicket(username, false, 15);
  encryptedTicket = FormsAuthentication.Encrypt(authTicket);
  authCookie = new HttpCookie(FormsAuthentication.FormsCookieName,
encryptedTicket);
  Response.Redirect("secure/index.aspx");

 }

The problem is that asp.net is denying access to the secure directory even
once I have do the above.

Can anyone see what I have missed out?

Am I right in thinking that this is all I have to do?

Thanks to anyone who can help

Simon



Relevant Pages

  • Re: Securing short hand views in SQL/MP
    ... >Rob Lesan wrote: ... >> Dave, I see what you are trying to say here, but what I want to accomplish is ... >columns without changing security on the tables to "NNNN". ... a user access to ONLY the view and NEVER the underlying table. ...
    (comp.sys.tandem)
  • Re: Securing short hand views in SQL/MP
    ... This allows the DBA to give a user access to ONLY the view and NEVER the underlying table. ... What you are saying is that your DBA is trustd to set security policy with regards to data access but is not given the tools to do it - correct? ...
    (comp.sys.tandem)
  • Re: Column-level Security
    ... the thing with this approach is that the _view_ is the security. ... - Disallow any user access to the table. ... On SQL Server 2005 at least, my tests indicate that my WHERE only sees the ... The SELECT permission was denied on the column ... ...
    (microsoft.public.sqlserver.security)
  • Re: User security + mde question
    ... security (just use the MDW to manage user access), ... since MS called the account "admin" it seems that their original ...
    (comp.databases.ms-access)
  • Re: Allowing a non-admin user run a program
    ... without an admin password. ... installed in, click on the Security tab, the click on the "Edit" ... The User Access Control warning here is actually a result not of the ... typing program itself, but of the file "ISI Updater.exe". ...
    (microsoft.public.windows.vista.administration_accounts_passwords)