473,387 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Forms authentication - restricting certain pages

Hi
I want to have most of my website available to users without any
authentication (ie. they can freely browse). However, if they go to a
restricted part, they should be redirected to a login page, and then
authenticated.

I don't want to use SQL Server, as I would have to pay for that with my
host. I would prefer to use Access, or even a custom method.

Does anyone have any sample code, or can point me to some resource examples?

Thanks
Oct 1 '06 #1
1 1426
You can do it with Access just as easily as SQL Server. Any datasource will
work just fine and you can even put users into the web.config file if you
need to. Basically, you can write your own authentication method if you
need, and then just use some of the forms authentication features to handle
all your redirection and writing of the forms authentication cookies.

Check out some of these links as good starting points:

http://samples.gotdotnet.com/quickstart/aspplus/

http://www.15seconds.com/issue/020220.htm

http://msdn.microsoft.com/library/de...tionevents.asp

http://www.4guysfromrolla.com/webtech/110701-1.shtml

The trick will be, you can only have one login form per application. You can
use the location element in the forms authentication config area to define
files that certain users can get access to.

There's also a sample project for the Membership providers done in MS
Access. You'll need at least Visual C# Express (which is free) to compile
it. To get it go to http://msdn.microsoft.com/vstudio/do...s/starterkits/
and scroll down to the Sample Access Provider link.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Paul Aspinall" <pa**@aspy.co.ukwrote in message
news:nP******************@fe2.news.blueyonder.co.u k...
Hi
I want to have most of my website available to users without any
authentication (ie. they can freely browse). However, if they go to a
restricted part, they should be redirected to a login page, and then
authenticated.

I don't want to use SQL Server, as I would have to pay for that with my
host. I would prefer to use Access, or even a custom method.

Does anyone have any sample code, or can point me to some resource
examples?

Thanks


Oct 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Paul Daly (MCP) | last post by:
Background: I want to be able to authenticate users whose usernames & passwords are stored in a SQL database. I only want certain pages to require authentication. I have tried to implement this...
3
by: kevin | last post by:
hi all with forms authentication, how does that work for a site with introduction and tour or maybe some more pages? by using forms authentication, all pages have to be authenticated before...
2
by: Peter | last post by:
I have a site which uses forms authentication but I would like to exclude certain pages on the site from authentication. In other words I would like the user to be able to get to these pages...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
1
by: - Steve - | last post by:
I have a directory that I want to use forms based authentication on. There's a couple of pages in that directory that I want to allow anonymous access to. There's also one page that I want to...
5
by: Samba | last post by:
Hi, I've a web application and I'm using Forms authentication. My app contains some pages that can be viewed by everyone and it doesn't require any authentication or authoization and these pages...
1
by: Kram | last post by:
Hello All, I have a asp.net 1.1 app which currently implements Forms Authentication. This all works 100% as far as I can see. But I want to change it slightly and dont know how to do it. I...
3
by: =?Utf-8?B?TWF4IFR1cmF2YW5p?= | last post by:
Hi, Is there any way I can cause a login page to appear, using Forms authentication of course, when access a particular page only. In my case, I am building a site for rental properties. There...
5
by: Rory Becker | last post by:
Having now created a Custom MembershipProvider that seems to work correctly with my Logon and ChangePassword controls, I am, as they say, a happy bunny. The next stange is to move on to the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.