Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2006, 06:13 AM
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default web.config

please send sample example for web.config for following purpose:

Is there any possibility to restrict the users through web.config for accessing certain pages

 
Old October 19th, 2006, 12:11 PM
Registered User
 
Join Date: Oct 2006
Location: New Delhi, New Delhi, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rajdotnet
Default

You can use authentication and authorization.

Raj
 
Old November 29th, 2006, 02:33 AM
Registered User
 
Join Date: Mar 2006
Location: chennai, TN, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to vinodhanandhan
Default

hi

Try the Following

Following code on the webconfig inside system.web tag
won't allow any one to access our page without authorization
<system.web>
    <authorization>
    <deny users="?"/>
    </authorization>
</system.web>
If you want to allow user to certain pages means
use the following code

<location path="YourPath">
        <system.web>
            <authorization>
                <allow users="*"/>
            </authorization>
        </system.web>
    </location>





vinodh
 
Old November 29th, 2006, 10:09 AM
Authorized User
 
Join Date: Sep 2006
Location: , , India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi ,you have 2 options .
1) Either put all the files to be resticted in seperate folder and in that folder u create web.config and put the code as vinodhanandhan
said.
2)u can use the LOCATION element to apply settings for partiular folder or page








Similar Threads
Thread Thread Starter Forum Replies Last Post
web.config dpkbahuguna ASP.NET 3.5 Basics 2 August 26th, 2008 09:41 AM
web.config vs. app.config darlo Visual Studio 2005 11 August 20th, 2008 07:23 AM
web.config rrkano .NET Framework 2.0 1 June 23rd, 2008 02:50 PM
I need Help with web.config please ! _fluffy_ BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 January 4th, 2007 05:31 PM
Web Config C# akshay144 VS.NET 2002/2003 0 November 10th, 2006 10:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.