473,320 Members | 1,879 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,320 software developers and data experts.

Forms Authentication problem

Hi all,

I have a problem with Forms Auth. I am not using the protected folder
method, rather, I want some parts of the page to be shown depending on the
authentication state.

Basically, I have a dashboard application. In the dashboard, I have various
hyperlinks and linkbuttons. I have also created roles and each user will be
assigned a role and the buttons in the dashboard will depend on the role. If
the person is not authenticated, then the dashboard does not even show.

This works fantastically, though took me a while to figure it out (as all
the examples of formsauth on the net show you to protect a folder, which is
not what I wanted.)

Now, the structure of my site is like...

root (application)
Admin (application)
Apps_VB (application)
Apps_CS (application)
Folder1
Folder2

Now, when I have logged in and get my dashboard, one of the buttons pops up
a page from my Admin folder (which is declared as an application in IIS).
This may be the problem but I need to find a way around it.

The pop-up from the Admin folder checks my user.isauthenticated but finds it
is not, even though the button to pop it will not be visible if the parent
app was not authenticated.

How can I get my authentication to be passed into the Admin part of my
application? Any ideas will be most appreciated.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
Apr 4 '07 #1
4 1730
On Apr 4, 8:58 pm, "David"
<david.colliver.N...@revilloc.REMOVETHIS.comwrot e:
Hi all,

I have a problem with Forms Auth. I am not using the protected folder
method, rather, I want some parts of the page to be shown depending on the
authentication state.

Basically, I have a dashboard application. In the dashboard, I have various
hyperlinks and linkbuttons. I have also created roles and each user will be
assigned a role and the buttons in the dashboard will depend on the role. If
the person is not authenticated, then the dashboard does not even show.

This works fantastically, though took me a while to figure it out (as all
the examples of formsauth on the net show you to protect a folder, which is
not what I wanted.)

Now, the structure of my site is like...

root (application)
Admin (application)
Apps_VB (application)
Apps_CS (application)
Folder1
Folder2

Now, when I have logged in and get my dashboard, one of the buttons pops up
a page from my Admin folder (which is declared as an application in IIS).
This may be the problem but I need to find a way around it.

The pop-up from the Admin folder checks my user.isauthenticated but finds it
is not, even though the button to pop it will not be visible if the parent
app was not authenticated.

How can I get my authentication to be passed into the Admin part of my
application? Any ideas will be most appreciated.
--
Best regards,
Dave Colliver.http://www.AshfieldFOCUS.com
~~http://www.FOCUSPortals.com- Local franchises available
To configure forms authentication across two applications, you should
use the same machineKey in web.config of your root and admin.

<machineKey
validationKey="..."
decryptionKey="..."
validation="SHA1" />

Forms Authentication Across Applications
http://msdn2.microsoft.com/en-us/library/eb0zx8fc.aspx

How to create keys by using Visual C# .NET for use in Forms
authentication
http://support.microsoft.com/kb/312906

Apr 4 '07 #2
The LoginView control of ASP.NET 2.0 should be able to do the trick for you.
There are several other controls that could be useful to you as well, and
I've described them all here:
http://SteveOrr.net/articles/SecureYourSite.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"David" <da*****************@revilloc.REMOVETHIS.comwrot e in message
news:uv****************@TK2MSFTNGP04.phx.gbl...
Hi all,

I have a problem with Forms Auth. I am not using the protected folder
method, rather, I want some parts of the page to be shown depending on the
authentication state.

Basically, I have a dashboard application. In the dashboard, I have
various hyperlinks and linkbuttons. I have also created roles and each
user will be assigned a role and the buttons in the dashboard will depend
on the role. If the person is not authenticated, then the dashboard does
not even show.

This works fantastically, though took me a while to figure it out (as all
the examples of formsauth on the net show you to protect a folder, which
is not what I wanted.)

Now, the structure of my site is like...

root (application)
Admin (application)
Apps_VB (application)
Apps_CS (application)
Folder1
Folder2

Now, when I have logged in and get my dashboard, one of the buttons pops
up a page from my Admin folder (which is declared as an application in
IIS). This may be the problem but I need to find a way around it.

The pop-up from the Admin folder checks my user.isauthenticated but finds
it is not, even though the button to pop it will not be visible if the
parent app was not authenticated.

How can I get my authentication to be passed into the Admin part of my
application? Any ideas will be most appreciated.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
Apr 4 '07 #3
On Apr 4, 11:35 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<S...@Orr.netwrote:
The LoginView control of ASP.NET 2.0 should be able to do the trick for you.
There are several other controls that could be useful to you as well, and
I've described them all here:http://SteveOrr.net/articles/SecureYourSite.aspx
I am afraid I don't see anything that might help in the LoginView here

Apr 4 '07 #4
Aside from that, I am using .NET 1.1

I usually state that in my posts. I must have forgotten on this one...

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Alexey Smirnov" <al************@gmail.comwrote in message
news:11*********************@w1g2000hsg.googlegrou ps.com...
On Apr 4, 11:35 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<S...@Orr.netwrote:
>The LoginView control of ASP.NET 2.0 should be able to do the trick for
you.
There are several other controls that could be useful to you as well, and
I've described them all
here:http://SteveOrr.net/articles/SecureYourSite.aspx

I am afraid I don't see anything that might help in the LoginView here

Apr 5 '07 #5

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

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
2
by: Senthil | last post by:
1. Created a new C# web application project 2. Change the name of webform1 to login.aspx 3. And in the .cs file change the name of the class to login, and include System.web.security namespace....
4
by: Greg Burns | last post by:
I have built a web app that uses forms authentication. There isn't a "remember me" feature (i.e. the authentication cookie is not permanent). When you close the browser, and open a new one, you...
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...
9
by: Hermit Dave | last post by:
Hi, I am making a web application (rather two applications) one which is host and used by customers when they are just browsing through products. The second application resides on a secure...
1
by: Rob | last post by:
I have an ASP.NET application that uses forms-based authentication. A user wishes to be able to run multiple sessions of this application simultaneously from the user's client machine. The...
5
by: Gavin Stevens | last post by:
I'm trying to figure out the ASP.NET Forms Auth I have 3 or 4 pages i want to allow anonymous access to.. Then I have 5 or 6 pages I placed in another directory in the webproject. These I want...
7
by: Justin | last post by:
I am trying to password protect a subdirectory using forms authentication. I am using the "Location" tag to specify the directory to be protected. The login.aspx page is in the root directory of...
1
by: n33470 | last post by:
Hi all, We have an asp.net 1.1 app that we're in the process of converting to 2.0. What I'm about to describe runs just great in the 1.1 framework, but does not work in the 2.0 framework. ...
4
by: =?Utf-8?B?R3V1czEyMw==?= | last post by:
Hi, I created a web site on a remote server. To logon the user must enter a user id and password. The site is uses Forms Authentication. The web config file looks as follows: ...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.