Link to home
Start Free TrialLog in
Avatar of nigelbogle
nigelbogle

asked on

Web.config multiple frames and loginurl

Hi all,

I have a web form created in asp.net which consists of multiple frames and I am having a problem which is slowly driving me mad.  The .aspx page is designed so that the central area of the screen is the frame that has the user interface.  The other frames act as a border around the outside.

I needed to have an area of the site which was secured and an unsecured area which I eventually found out could be done by using the <location> tag in the web.config file.  That's all fine. My problem is that I have a login.asox page which is specified in the web.config against the loginurl as follows: loginurl="login.aspx"

When the user tries to navigate to a page in the secure area directly I want the logon page to appear, which I can get it to if I'm not using frames and it will subsequently redirect me to the page initially requested.  Using my nice frameset I can't figure out how to get the login.aspx to appear in the frame called "mainframe" and then to automatically redirect me to the intially requested page, again displaying it in the "mainframe".

I feel there is bound to be a way to do this as other websites use frames and seem to do what I'm trying to achieve.

All help greatly appreciated.

Thanks in advance.
Nigel.
SOLUTION
Avatar of Thalox
Thalox

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nigelbogle
nigelbogle

ASKER

Hi there,

Thanks for the quick reply.  

I have an .aspx page which uses frames.  When I run my application the frames around the outside appear ok as does the centre frame with my start page on it.  If the user goes straight to the address bar and types in the url of a page in the protected area directly then the program is loading my loginurl specified in the web.config but it runs it as a single page and my frames disappear.

When I type in my details and get authenticated ok the Forms.RedirectFromLoginPage command does redirect but again to a single page.

Trying to get this all to work so that the directing and redirecting makes the page being directed or redirected to appear in my main frame is the problem.

Hope that helps.

Nigel
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Guys,

Thanks for your efforts.  Your answers, although not exactly what I was looking for pointed me in the right direction.  I eventually used a 3 x 3 html table and dropped a gridlayout component into the cell where I needed to put controls.  I also used wildcards for the outer cells so that they resized giving me the desired effect.

The results can be seen @ http://colossus.swiftsoft.com

Thanks for your help everyone.  I felt it only fair to split the points for your efforts and to qualify the solution here.

Cheers,
Nigel.