Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to give access limit to my web application according to my client
Posted
Comments
[no name] 25-Jun-12 7:11am    
Okay.... you have my permission. Are we supposed to know what "access limit" means? Did you forget to ask a question?
Rahul Rajat Singh 25-Jun-12 7:45am    
Could you tell us what do you mean by that. did you meant - user access is required?
Pankaj Nikam 25-Jun-12 7:54am    
Please provide the details as in what do you mean by access limit... Do you want to restrict a particular users based on IP Address OR Login/Password. Please ellaborate further so that we can help you.

Add below in web.config of your web application with list of users and roles you want to give access to.

<authorization>
			
			<deny users="*" />
			<allow users="[comma separated list of users]" roles="[comma separated list of roles]" />
			<deny users="[comma separated list of users]" roles="[comma separated list of roles]" />
			
</authorization>
 
Share this answer
 
Assuming that you are talking about providing user access based on some predefined roles in you application.

If, that being the case please refer this:

1. Understanding ASP.NET Roles and Membership - A Beginner's Tutorial[^]
2. Understanding and Implementing ASP.NET Custom Forms Authentication[^]

If you can implement the desired functionality using the first article technique you dont have to refer to the other one. the second one is required when you need to take more control of things in your hands. but yes knowing both the techniques will help you choose which route you want to take, or which will be easier and/or feasible in your case.
 
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