C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » ASP.NET/Web Applications »

Web site access permission.


Posted Date: 28 Oct 2009    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: LaljiMember Level: Diamond    
Rating: 1 out of 5Points: 10



You will configure IIS to require Windows-integrated authentication for the WindowsSite site.

1. Minimize Visual Studio, and then start Internet Services Manager from the Administrative Tools program group.
2. Expand your server and its default Web site, right-click the WindowsSite site, and then click Properties.
3. On the Directory Security tab in the WindowsSite Properties dialog box, click the Edit button in the "Anonymous access and authentication control" section.
4. Click to clear the Anonymous access check box, verify that the Integrated Windows authentication check box is selected, and then click OK.
5. Click OK to close the WindowsSite Properties dialog box.
6. Switch back to Visual Studio, and then run the project. Confirm that the page is displayed with the following message:
* In Windows 2000
You are: Your Windows user name
This page runs as: DomainOrServer\ASPNET
* In Windows Server 2003
You are: Your Windows user name
This page runs as: DomainOrServer\NETWORK SERVICE
Note You have been authenticated through your Windows account. If you had not been logged on to Windows, you would have been prompted for a Windows user name and password.
7. Quit Internet Explorer to stop the project.

Authorization
In ASP.NET, it is possible to allow authorization to the application when you make additional settings available within the Web.config file. You can allow certain users or certain groups access to these additional settings. The following examples describe this capability. To allow access to all users found in the Windows NT Group that is called "Managers," use the following code:


<configuration>
<system.web>
<authorization>
<allow roles="domainname\Managers" />
<deny users="*" />
</authorization>
</system.web>
</configuration>

To allow access to only certain users, use the following code:

<configuration>
<system.web>
<authorization>
<allow users="domainname\user1,domainname\user2,domainname\user3" />
<deny users="*" />
</authorization>
</system.web>
</configuration>


Note You can reference multiple roles or users when you use a comma-separated list.



Responses

Author: arun    28 Oct 2009Member Level: Gold   Points : 1
What if I have increasing number of users?
how can I group all users and allow/ deny permissions


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Web Site access permition.  .  Web Site access permission  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Delegates in C# & VB.NET
Previous Resource: Dataset relation to bind nested repeater
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use