473,569 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Forms authentication & frames

Hi,

After I gave up on tracking user sessions through the session object
(Session_OnEnd is still not triggered by Abandon() even with mode=InProc and
me manipulating session variables; in a new test project it is only
triggered the first time, it really sucks pretty bad) I started looking at
alternatives and I found FormsAuthentica tion. I just implemened it and it
seems very nice. But, of course, there is a problem with it (it wouldn't be
fun if it all just worked straight away, right?).

My entry-page is a frame set. Now the trouble is that the login page to
which I am automatically redirected before I get to this page with the frame
set does not embed nicely into the targeted frame. It is a matter of
sequence I guess, I do have

<base target="RightPa ne" />

in mij login.aspx file but there is no RightPane until I am authenticated
and the frame set gets executed in the browser.

After the second redirect (when I have been authenticated) it gets worse.
The frame set embeds my home page as it should, but any subsequent pages I
navigatye to appear "full screen", disregarding the frame set where they
used to be embedded in because of the base tag. Does anyone how to handle
this nicely?

I think what I want is authentication to ignore my frame set page (to allow
anonymous visitors to it). I read something about location tags in
web.config. Could these be helpful? This would all be work-arounds though, I
am interested to head about your ideas on the matter.

Regards, Martin.
Nov 18 '05 #1
1 2082
Hi,

I am beginning to like ASP.NET. The problem with frame sets and forms
authentication is actually accomodated quite nicely by the configuration
framework. Let me illustrate.

This is the way to activate forms authentication. You need to add this to
the System.Web section in web.config:

<authenticati on mode="Forms">
<forms name=".MWTE_Coo kie" loginUrl="aanme lden.aspx" protection="All "
timeout="30" path="/">
<credentials passwordFormat= "Clear">
<user name="Anoniem" password="Anoni em" />
</credentials>
</forms>
</authentication>

<authorizatio n>
<!--
<allow users="*" />
-->
<deny users="?" />
</authorization>

The above is a first effort, I am still to use some sort of encryption of
passwords, which can also be done declaratively using the passwordFormat
attribute. Now if you leave it there you'll be disappointed, it messes up
the use of your frame set as I described earlier. In the back of my mind I
remembered something about a way to apply separate configurations to
different parts of your site. So I looked it up and used a <location> tag to
exclude my frame set from authentication like this:

<!-- exclude supporting frame set from forms authentication -->
<location path="default.a spx">
<system.web>
<authorizatio n>
<allow users="*" />
</authorization>
</system.web>
</location>

You need to place this outside the System.Web tag. This did make a
difference and the result made me laugh. My frame set comprises 5 different
target windows and I got my login page in each and everyone of them.

Adding a location tag like the one above for each frame window but the main
content window got me the behavior I was after.

Martin.
"Martin" <du***@somewher e.nl> wrote in message
news:3f******** *************** @news.wanadoo.n l...
Hi,

After I gave up on tracking user sessions through the session object
(Session_OnEnd is still not triggered by Abandon() even with mode=InProc and me manipulating session variables; in a new test project it is only
triggered the first time, it really sucks pretty bad) I started looking at
alternatives and I found FormsAuthentica tion. I just implemened it and it
seems very nice. But, of course, there is a problem with it (it wouldn't be fun if it all just worked straight away, right?).

My entry-page is a frame set. Now the trouble is that the login page to
which I am automatically redirected before I get to this page with the frame set does not embed nicely into the targeted frame. It is a matter of
sequence I guess, I do have

<base target="RightPa ne" />

in mij login.aspx file but there is no RightPane until I am authenticated
and the frame set gets executed in the browser.

After the second redirect (when I have been authenticated) it gets worse.
The frame set embeds my home page as it should, but any subsequent pages I
navigatye to appear "full screen", disregarding the frame set where they
used to be embedded in because of the base tag. Does anyone how to handle
this nicely?

I think what I want is authentication to ignore my frame set page (to allow anonymous visitors to it). I read something about location tags in
web.config. Could these be helpful? This would all be work-arounds though, I am interested to head about your ideas on the matter.

Regards, Martin.

Nov 18 '05 #2

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

Similar topics

2
2839
by: Billy Jacobs | last post by:
I have a web application which is using Forms Authentication. The main page of the site is a frames page. If I type in the url to the frames page, it loads the login page inside of the main frame instead of redirecting to the login page by itself. Why doesn't it redirect completely to the login page.
3
357
by: G-Fit | last post by:
Hello group, I use Forms Authentication in an intranet website. This website has a framed default.aspx page : one left frame for a menu, one right frame for the content. The menu depends on the authentication (i.e. each user won't see the same menu) : for this, I use another cookie (let's call it the user_id cookie). If a user identifies...
2
1606
by: sushi | last post by:
Hello, I have an web site which uses forms authentication. The application uses frames. When the authentication time out occurs and if we click on any one of the frames, each individual pages shows login page. Is there any way out to show login page in whole page and not in each individual frames. Else if there any event which is called...
0
1272
by: Charles Rumbold | last post by:
I am using Forms Authentication and Frames. FA doesn't cover HTML files, only ASP files. If a user goes direct to a frame (e.g. from a bookmark) then the frame opens with a logon window in each frame. How do I get round this? Thanks, Charles
0
1520
by: Chris Mohan | last post by:
Hi, I've configured a web app to use windows authentication and also set up two separate subdirectories to use forms authentication. It appears to work fine but I have never seen a sample that demonstrates both in the same web.config and I don't like assuming i've done this correctly and securely. Please take a look at the following from my...
2
2873
by: Andy Fish | last post by:
Hi, I have a problem using forms based authentication with a frameset. I made sure the containing frameset is an aspx so the first time the user tries to access the application he just gets the login page, and the frameset doesn't appear until after he's logged in However, when the user's login session times out and he subsequently...
0
1428
by: Grzegorz Kaczor | last post by:
Hello, I have an ASP.NET application in my website in virtual folder A. This folder contains the application itself. I also have a data virtual directory B which contains data that can be seen by authenticated users. I've implemented forms authentication (with application in folder A) in a standard way. I've also set up a redirection in...
0
2101
by: Lee | last post by:
Hi all ;) Preamble -------- I'm using URL rewriting to enforce a frames policy (yeah, I know frames are 'bad' :) - i.e. if a request comes in for a page which should be nested within a frameset, the url is rewritten to something of the form 'http://www.blah.com/framesdoc.aspx?lowerFrame=/page.aspx', the 'framesdoc' page then dynamically...
2
3735
by: Rob R. Ainscough | last post by:
I'm using forms authentication along with Master pages -- my authenticated forms reside is a sub-dir (Secure) below the web site root dir. The problem is that any graphics placed on the Master page do NOT appear in any of the web forms located in my Secure dir, however, any forms off the root of my web app will display the master page with...
0
7694
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2107
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.