Click here to Skip to main content
15,918,404 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
hi
i am facing with the problem in windows authentication , i had four account like s1,s2,s3,s4 in my windows and it had the password like s1,s2,s3,s4

i had not done any type of setting in iis,

i had added the four folders in my project
1.s1
2.s2
3.s3
4.s4

in s1 folder i had kept the .aspx files (i.e which he contains the Permession )
and i had the "web.confingfile in s1 folder " and in web.config file i had modified the data as

<pre lang="xml"><?xml version="1.0"?>
<configuration>
  <system.web>
    <authorization >
      <allow users = "s1" />
      <deny users ="*" />
    </authorization>
  </system.web>
</configuration>




in the above process i had added all the files in the s2,s3,s4 folders
and also web.config file is added in all the respectively folders with the small chang in allow tag

<allow users="s2" />


<allow users="s3" />


<allow users=" s4" />


i had kept the everything same in web.config file



in main web.config file

i had used the sample code

<pre lang="xml"><authentication mode="Windows">
   </authentication>
   <authorization>
     <!--<allow users = "*" />
     <deny users ="?" />-->
   </authorization

>



when i am pressing the f5 then login page is appered which was desgigned by me after submitting the login paremeter what ever is the username and password i am gettingt the same result as
error
this is the error :


MSIL
Server Error in '/aspnet_client/Practise WebExamples/sdsw' Application.
Access is denied.

Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration.  Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server.  Contact the Web server's administrator for additional assistance.
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927




i dont had much idea on asp.net, where i am going wrong , is athere any other process for doing the Windows authentication please specify
thanks alot for staying with me
Posted
Updated 31-May-11 21:57pm
v3

1 solution

you must use either IIS Manager to configure your application's virtual directory security settings or Impersonation with Windows Authentication

Refer :

http://msdn.microsoft.com/en-us/library/ff647405.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900