D
Dan
Hello, I'm experimenting with VS2003 and ASP.NET and I have an issue with
forms authentication: I have created a VS solution and added to it a new web
application project; then I added some dummy pages to the project. Now I'd
like to protect an administrative section of this dummy website, so I
created a new folder named "admin" in my webapp project (in VS2003,
right-clicking the project and selecting Add/New Folder). I have then placed
in this folder (adding new items to the VS project):
1) a login web form (login.aspx).
2) a dummy HTML page hyperlinked by some root (unrestricted-access) pages.
3) a Web.config file to override the default (root) settings, with the
following code:
<system.web>
<authentication mode="Forms">
<forms name=".ASPXAUTH" path="/" loginUrl="login.aspx" protection="All"
timeout="30">
<credentials passwordFormat="Clear">
<user name="Mickey" password="Mouse"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
Now when I click the hyperlink to the protected (i.e. under path admin/)
HTML page, the login form is NOT invoked and I can access the page as if it
had no protection. What I'm doing wrong?
Thanks guys...
forms authentication: I have created a VS solution and added to it a new web
application project; then I added some dummy pages to the project. Now I'd
like to protect an administrative section of this dummy website, so I
created a new folder named "admin" in my webapp project (in VS2003,
right-clicking the project and selecting Add/New Folder). I have then placed
in this folder (adding new items to the VS project):
1) a login web form (login.aspx).
2) a dummy HTML page hyperlinked by some root (unrestricted-access) pages.
3) a Web.config file to override the default (root) settings, with the
following code:
<system.web>
<authentication mode="Forms">
<forms name=".ASPXAUTH" path="/" loginUrl="login.aspx" protection="All"
timeout="30">
<credentials passwordFormat="Clear">
<user name="Mickey" password="Mouse"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
Now when I click the hyperlink to the protected (i.e. under path admin/)
HTML page, the login form is NOT invoked and I can access the page as if it
had no protection. What I'm doing wrong?
Thanks guys...