473,385 Members | 2,005 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,385 software developers and data experts.

Web.Config and Authentication

Hello,

I am creating a web site with a Content Management System.

The web site doesn't have any restricted area.
The CMS has a login page and all pages in it need the user to be
authenticated.

I am following this tutorial in MSDN:
http://support.microsoft.com/kb/308157/EN-US/

I am having a few problems the moment I start to make changes in
<authorization> in my web config file.

Should I use 2 web.cofig files? One for the web site pages and other for
the CMS pages. Well, I don't know if this is even possible.

And how can I set that pages A and B need authentication and pages C, D
and E don't need authentication.

Can someone give me some help and guidance on this?

Thanks,
Miguel

Nov 19 '05 #1
2 1683
Depending on the number of non-secure pages, you have two options.

1. Create two apps, one secure and one not. You can have the secure app
inside the non-secure so they appear the same to the user. If you do not
store anything in the Session object, you can also institute single sign on
for any number of apps by using the same session cookie name and
encrypt/decrypt keys.

2. Set up exclusions for the files you wish the user to hit (with 1.1, I
believe each file has to be excluded individually, whether config or
programatic).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Shapper" wrote:
Hello,

I am creating a web site with a Content Management System.

The web site doesn't have any restricted area.
The CMS has a login page and all pages in it need the user to be
authenticated.

I am following this tutorial in MSDN:
http://support.microsoft.com/kb/308157/EN-US/

I am having a few problems the moment I start to make changes in
<authorization> in my web config file.

Should I use 2 web.cofig files? One for the web site pages and other for
the CMS pages. Well, I don't know if this is even possible.

And how can I set that pages A and B need authentication and pages C, D
and E don't need authentication.

Can someone give me some help and guidance on this?

Thanks,
Miguel

Nov 19 '05 #2
Hello,

My plan is as follows:

1. Redirect the user to login.aspx when the user visits a protected page
and it is not login yet.

2. After login 2 information need to be available:
a) User has Login
b) User Access Level

3. In each protected page I need to be able to:
a) Check if user has login
b) Check what is the user access level.

Can someone help me out with this?
I have been reading an but I got completely lost about it as it just
simulates a simple login with no access level and no public and
protected pages.

Thanks,
Miguel

"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM>
wrote in message news:No************@comcast.netNoSpamM:
Depending on the number of non-secure pages, you have two options.

1. Create two apps, one secure and one not. You can have the secure app
inside the non-secure so they appear the same to the user. If you do not
store anything in the Session object, you can also institute single sign on
for any number of apps by using the same session cookie name and
encrypt/decrypt keys.

2. Set up exclusions for the files you wish the user to hit (with 1.1, I
believe each file has to be excluded individually, whether config or
programatic).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Shapper" wrote:

Hello,

I am creating a web site with a Content Management System.

The web site doesn't have any restricted area.
The CMS has a login page and all pages in it need the user to be
authenticated.

I am following this tutorial in MSDN:
http://support.microsoft.com/kb/308157/EN-US/

I am having a few problems the moment I start to make changes in
<authorization> in my web config file.

Should I use 2 web.cofig files? One for the web site pages and other for
the CMS pages. Well, I don't know if this is even possible.

And how can I set that pages A and B need authentication and pages C, D
and E don't need authentication.

Can someone give me some help and guidance on this?

Thanks,
Miguel


Nov 19 '05 #3

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

Similar topics

1
by: MJ | last post by:
I'm building an application that has a file structure similar to the following: /myapp/user_login.aspx /myapp/user_page_1.aspx /myapp/user_page_2.aspx /myapp/user_page_3.aspx...
2
by: Maziar Aflatoun | last post by:
Hi, I'm trying to protect one of my subfolders from Web.config file in my root folder. Here is my directory structure / // My shopping cart /admin // Shopping cart...
6
by: Andrew Connell | last post by:
I have an app where I want virtually everything password protected/secure except for a single directory. That directory handles some custom authentication and contains my login form, but also some...
4
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
0
by: Adam Getchell | last post by:
I'm attempting to write a custom Authentication module using http://www.15seconds.com/Issue/020417.htm I looked at http://support.microsoft.com/default.aspx?scid=kb;EN-US;307996, but it doesn't...
3
by: Henry | last post by:
Hi, my asp.net application is accessing a mssql on another server. This works fine when I use this in my web.config file: <add key="dbkey"...
4
by: Bennett Haselton | last post by:
If I add this to my web.config file: <authentication mode="Forms"> <forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" timeout="60" /> </authentication> I can configure the...
9
by: Benny Ng | last post by:
Hi,all, How to let the sub-directory to avoid the authentication control from Root's webconfig? I heard that we can add a new web.config to the sub-directory. And then we can slove the problem....
5
by: Andrew | last post by:
Hi, I have a default.aspx which allows the user to choose between module Admin and module B. When the user clicks either one, he will be redirected to a FormsAuthentication login page. The...
4
by: yancheng.cheok | last post by:
Hello all, I have a web application, which I had developed few years ago with ASP .NET 1.1 Today, I would like to deploy the web application to client, using ASP .NET 2.0 + UltiDev Cassini...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.