Re: newbie -- forms authentication
From: Dan (dfusi_at_hotmail.com)
Date: 02/17/05
- Next message: Alan Silver: "How do I allow them to choose a date WITHOUT a postback?"
- Previous message: JStemper: "Re: Error running ASPNET_RegIIS -c"
- In reply to: Andy Sutorius: "Re: newbie -- forms authentication"
- Next in thread: Andy Sutorius: "Re: newbie -- forms authentication"
- Reply: Andy Sutorius: "Re: newbie -- forms authentication"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Feb 2005 17:00:18 +0100
Thank you all guys, I tried some fixes but it still does not work... The
subdirectory "admin" is just a directory of the unique (root) web
application, but this should not harm as suggested by the article pointed by
Andy. I tried to follow this article by making the following changes:
1) remove the web.config file in admin subdir
2) add forms authentication to the root web.config file, and a <location>
tag to specify that the admin subdir should be protected, as follows:
---> in <configuration> / <system.web> tree of the root config file:
<authentication mode="Forms">
<forms name=".ASPXAUTH" path="/" loginUrl="FrmLogin.aspx" protection="All"
timeout="30">
<credentials passwordFormat="Clear">
<user name="Mickey" password="Mouse"/>
</credentials>
</forms>
</authentication>
<authorization>
<allow users="*" />
</authorization>
<location path="admin">
<authorization>
<deny users="?"/>
</authorization>
</location>
Anyway, I still get the same results, i.e. all works fine but no protection
is active for any file under admin folder. I can add here the whole process
of creating the sample application here so that someone can try reproducing
the issue, maybe there is something wrong with my approach as I have changed
the VS2003 default location because I need ALL my web apps files in my local
drive folder. Here it is how I created the web application (see
http://www.codeproject.com/useritems/ASPNET_projects.asp):
1. I create my project folder in my local drive, e.g. C:\MyProject.
2. I create a folder named "www" inside C:\MyProject (=C:\MyProject\www),
where all the apps files will be stored.
3. In IIS I create a new virtual directory making it point to
C:\MyProject\www.
4. In VS2003 I create a new Blank Solution and save it in C:\MyProject, so
that if its name is Dummy its physical folder will be C:\MyProject\Dummy.
5. In VS2003 I add a New Project to the blank solution making it point it to
http://localhost/myproject.
If you then change the root web.config file as specified above and create an
admin folder, place some page into it and hyperlink it from the root folder
you should access it with no protection, which is of course wrong. Any idea?
- Next message: Alan Silver: "How do I allow them to choose a date WITHOUT a postback?"
- Previous message: JStemper: "Re: Error running ASPNET_RegIIS -c"
- In reply to: Andy Sutorius: "Re: newbie -- forms authentication"
- Next in thread: Andy Sutorius: "Re: newbie -- forms authentication"
- Reply: Andy Sutorius: "Re: newbie -- forms authentication"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|