web.config and authentication problem.

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default web.config and authentication problem.

    Hello there!

    I have developed a .net web application. In which I am having some .aspx files and a web.config file. All the files are in same folder. In my web.config file I set authentication mode as 'Forms'. I also have login.aspx fine in my app. Now when I try to access any page directely (without enter UID/PWD) I am not redirected to login.aspx. Below is my web.config code

    <authentication mode="Forms">
    <forms name="testApp" path="/" loginUrl="login.aspx" protection="All" timeout="30">
    <credentials passwordFormat="Clear">
    <user name="user1" password="pwd1" />
    <user name="user2" password="pwd2" />
    <user name="user3" password="pwd3 />
    </credentials>
    </forms>
    </authentication>

    <authorization>
    <allow users="user1,user2" />
    <deny users="user2" />
    </authorization>

    Withour entering my UID/PWD in my login.aspx file I can access any pages, I am not getting how is it happening? Can any body help me.

    Thanking you.
    Shail
    Shailesh Guest

  2. Similar Questions and Discussions

    1. WEB CONFIG PROBLEM
      I created i simple web service.. It runs well in my local Pc.. But when i copied it into my server it fails... it is about web config custom...
    2. WSE web.config problem
      Hi all, I have installed WSE 1.0 and have altered my project's web.config file to add: <webServices> <soapExtensionTypes> <add type=...
    3. Authorization, Authentication in Web.config
      Hi I am trying to ensure that users can only enter my Web service on a specific Login web page. I've amended Web.config so that authorization...
    4. Forms Authentication - GenericPrincipal- How to use web.config configuration
      MSDN has good articles that explains how to use GenericPrincipal objects with forms authentication. For instance,...
    5. Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)
      HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on my laptop which has Windows XP. I...
  3. #2

    Default web.config and authentication problem.

    Hello there!

    I have developed a .net web application. In which I am having some .aspx files and a web.config file. All the files are in same folder. In my web.config file I set authentication mode as 'Forms'. I also have login.aspx fine in my app. Now when I try to access any page directely (without enter UID/PWD) I am not redirected to login.aspx. Below is my web.config code

    <authentication mode="Forms">
    <forms name="testApp" path="/" loginUrl="login.aspx" protection="All" timeout="30">
    <credentials passwordFormat="Clear">
    <user name="user1" password="pwd1" />
    <user name="user2" password="pwd2" />
    <user name="user3" password="pwd3 />
    </credentials>
    </forms>
    </authentication>

    <authorization>
    <allow users="user1,user2" />
    <deny users="user2" />
    </authorization>

    Withour entering my UID/PWD in my login.aspx file I can access any pages, I am not getting how is it happening? Can any body help me.

    Thanking you.
    Shail
    Shailesh Guest

  4. #3

    Default web.config and authentication problem.

    Hello there!

    I have developed a .net web application. In which I am having some .aspx files and a web.config file. All the files are in same folder. In my web.config file I set authentication mode as 'Forms'. I also have login.aspx fine in my app. Now when I try to access any page directely (without enter UID/PWD) I am not redirected to login.aspx. Below is my web.config code

    <authentication mode="Forms">
    <forms name="testApp" path="/" loginUrl="login.aspx" protection="All" timeout="30">
    <credentials passwordFormat="Clear">
    <user name="user1" password="pwd1" />
    <user name="user2" password="pwd2" />
    <user name="user3" password="pwd3 />
    </credentials>
    </forms>
    </authentication>

    <authorization>
    <allow users="user1,user2" />
    <deny users="user2" />
    </authorization>

    Withour entering my UID/PWD in my login.aspx file I can access any pages, I am not getting how is it happening? Can any body help me.

    Thanking you.
    Shail
    Shailesh Guest

  5. #4

    Default web.config and authentication problem.

    Hello there!

    I have developed a .net web application. In which I am having some .aspx files and a web.config file. All the files are in same folder. In my web.config file I set authentication mode as 'Forms'. I also have login.aspx fine in my app. Now when I try to access any page directely (without enter UID/PWD) I am not redirected to login.aspx. Below is my web.config code

    <authentication mode="Forms">
    <forms name="testApp" path="/" loginUrl="login.aspx" protection="All" timeout="30">
    <credentials passwordFormat="Clear">
    <user name="user1" password="pwd1" />
    <user name="user2" password="pwd2" />
    <user name="user3" password="pwd3 />
    </credentials>
    </forms>
    </authentication>

    <authorization>
    <allow users="user1,user2" />
    <deny users="user2" />
    </authorization>

    Withour entering my UID/PWD in my login.aspx file I can access any pages, I am not getting how is it happening? Can any body help me.

    Thanking you.
    Shail
    Shailesh Guest

  6. #5

    Default web.config and authentication problem.

    Hello there!

    I have developed a .net web application. In this I am having some .aspx files and one web.config file. All the files are in same folder. In my web.config file I set authentication mode as 'Forms'. I also have login.aspx fine in my app. Now when I try to access any page directely (without enter UID/PWD) I am not redirected to login.aspx. Below is my web.config code

    <authentication mode="Forms">
    <forms name="testApp" path="/" loginUrl="login.aspx" protection="All" timeout="30">
    <credentials passwordFormat="Clear">
    <user name="user1" password="pwd1" />
    <user name="user2" password="pwd2" />
    <user name="user3" password="pwd3 />
    </credentials>
    </forms>
    </authentication>

    <authorization>
    <allow users="user1,user2" />
    <deny users="user2" />
    </authorization>

    Withour entering my UID/PWD in my login.aspx file I can access any pages, I am not getting how is it happening? Can any body help me.

    Thanking you.
    Shail
    Shailesh Guest

  7. #6

    Default RE: web.config and authentication problem.

    Dear Shailesh,

    you have to give the attribute

    <deny users="?" />

    currently you have denied only user2. that means, you are denying only him.

    deny users="?" will deny all unauthenticated users.

    hope it helps.




    "Shailesh" wrote:
    > Hello there!
    >
    > I have developed a .net web application. In this I am having some .aspx files and one web.config file. All the files are in same folder. In my web.config file I set authentication mode as 'Forms'. I also have login.aspx fine in my app. Now when I try to access any page directely (without enter UID/PWD) I am not redirected to login.aspx. Below is my web.config code
    >
    > <authentication mode="Forms">
    > <forms name="testApp" path="/" loginUrl="login.aspx" protection="All" timeout="30">
    > <credentials passwordFormat="Clear">
    > <user name="user1" password="pwd1" />
    > <user name="user2" password="pwd2" />
    > <user name="user3" password="pwd3 />
    > </credentials>
    > </forms>
    > </authentication>
    >
    > <authorization>
    > <allow users="user1,user2" />
    > <deny users="user2" />
    > </authorization>
    >
    > Withour entering my UID/PWD in my login.aspx file I can access any pages, I am not getting how is it happening? Can any body help me.
    >
    > Thanking you.
    > Shail
    ranganh Guest

  8. #7

    Default RE: web.config and authentication problem.

    Hi, Ranganh,

    Its works absolutely fine now.

    Thanx for your reply.
    Shail.

    "ranganh" wrote:
    > Dear Shailesh,
    >
    > you have to give the attribute
    >
    > <deny users="?" />
    >
    > currently you have denied only user2. that means, you are denying only him.
    >
    > deny users="?" will deny all unauthenticated users.
    >
    > hope it helps.
    >
    >
    >
    >
    > "Shailesh" wrote:
    >
    > > Hello there!
    > >
    > > I have developed a .net web application. In this I am having some .aspx files and one web.config file. All the files are in same folder. In my web.config file I set authentication mode as 'Forms'. I also have login.aspx fine in my app. Now when I try to access any page directely (without enter UID/PWD) I am not redirected to login.aspx. Below is my web.config code
    > >
    > > <authentication mode="Forms">
    > > <forms name="testApp" path="/" loginUrl="login.aspx" protection="All" timeout="30">
    > > <credentials passwordFormat="Clear">
    > > <user name="user1" password="pwd1" />
    > > <user name="user2" password="pwd2" />
    > > <user name="user3" password="pwd3 />
    > > </credentials>
    > > </forms>
    > > </authentication>
    > >
    > > <authorization>
    > > <allow users="user1,user2" />
    > > <deny users="user2" />
    > > </authorization>
    > >
    > > Withour entering my UID/PWD in my login.aspx file I can access any pages, I am not getting how is it happening? Can any body help me.
    > >
    > > Thanking you.
    > > Shail
    Shailesh Guest

Posting Permissions

  • You may not post new threads
  • You may 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