Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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

Reply With Quote
  #2 (permalink)  
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
Reply With Quote
  #3 (permalink)  
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
Reply With Quote
  #4 (permalink)  
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




Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:32 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.