Jul 9, 2010

How to authenticate users using web.config ?

if we are using form based authentication at that time in 
the web.config 
we can set the autentication mode to "form"

then we can specify the user name and password which we are 
going to access.
if any one can access that application then you can specify 
<allow users="*">
inside the authentication tags

<authentication mode="Forms">
            <forms name="appNameAuth" path="/" 
loginUrl="login.aspx" protection="All" timeout="30">
                <credentials passwordFormat="Clear">
                    <user name="jeff" password="test" />
                    <user name="mike" password="test" />
                </credentials>
            </forms>
        </authentication>
        <authorization>
            <deny users="?" />
        </authorization>

No comments:

Post a Comment