PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

asp.net 2.0 design login area case study

 
 
info.lowyeah@gmail.com
Guest
Posts: n/a
 
      22nd Jan 2008
Dear all,

I have an ASP.NET 2.0 website design problem.

I want to design a website, there are few normal pages(page1, page2,
page3) is to show my information. But there is another login
page(page4), which is used to allow advanced user to login and show
advanced page(page5,page6)

My problem is that when unauthorized user go to my main page, they no
need to go to login area to login.
But due to the web.config authorization setting, users cannot go to
all pages.
So, I add the following code
<location path="page1.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

But I found when I add one normal page, I need to add one set of the
above code in web.config. So I feel quite annoy.

Is there any good method to simply the above process?
For example, if I have 30 normal page (no need to authorized) and 3
advanced page (need to authorized), I need to add 30 <location></
location> tag to web.config.

Can anybody help me to solve this problem?

Regards and many thanks
 
Reply With Quote
 
 
 
 
nick chan
Guest
Posts: n/a
 
      22nd Jan 2008
i never played with web.config authorization thing before
my projects are similar to yours

I use inheritance

example

CBasePageX.vb CBasePageZ.vb

these 2 classes will inherit System.Web.UI.Page

in CBasePageX page_init, U check for Session("loginid1")
in CBasePageZ page_init, U check for Session("loginid2")


so u can let page1,2,3 inherit CBasePageX, and page4,5,6 inherit
CBasePageZ

if i login LoginX.aspx sucessfully, i put loginid in
Session("loginid1")
same thing for LoginZ.aspx and Session("loginid2")

so whenever I create a new page that needs different kinds of logins,
i just inherits on the CBasePage classes.

On Jan 22, 4:35*pm, info.lowy...@gmail.com wrote:
> Dear all,
>
> I have an ASP.NET 2.0 website design problem.
>
> I want to design a website, there are few normal pages(page1, page2,
> page3) is to show my information. But there is another login
> page(page4), which is used to allow advanced user to login and show
> advanced page(page5,page6)
>
> My problem is that when unauthorized user go to my main page, they no
> need to go to login area to login.
> But due to the web.config authorization setting, users cannot go to
> all pages.
> So, I add the following code
> <location path="page1.aspx">
> * * <system.web>
> * * * <authorization>
> * * * * <allow users="*" />
> * * * </authorization>
> * * </system.web>
> * </location>
>
> But I found when I add one normal page, I need to add one set of the
> above code in web.config. So I feel quite annoy.
>
> Is there any good *method to simply the above process?
> For example, if I have 30 normal page (no need to authorized) and 3
> advanced page (need to authorized), *I need to add 30 <location></
> location> tag to web.config.
>
> Can anybody help me to solve this problem?
>
> Regards and many thanks


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a Case Study or Patteren Omer Microsoft ASP .NET 1 5th Jan 2007 06:53 PM
do you have answers for the brookins case study? =?Utf-8?B?amVzcw==?= Microsoft Powerpoint 1 3rd Nov 2005 04:19 AM
ANN: OpenNETCF.org Case Study Chris Tacke, eMVP Microsoft Dot NET Compact Framework 0 3rd Mar 2004 11:49 AM
Re: Case Study: Fitch and Maither nospam Microsoft Dot NET 0 14th Nov 2003 04:50 PM
web portal case study jernej goricki Microsoft ASP .NET 2 9th Nov 2003 12:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:21 AM.