473,749 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.isauthenti cated 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 1767
On Apr 4, 8:58 pm, "David"
<david.colliver .N...@revilloc. REMOVETHIS.comw rote:
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.isauthenti cated 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="SHA 1" />

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.comw rote in message
news:uv******** ********@TK2MSF TNGP04.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.isauthenti cated 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.netwr ote:
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******** *************@w 1g2000hsg.googl egroups.com...
On Apr 4, 11:35 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<S...@Orr.netwr ote:
>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
4839
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 Authentication set up and it worked just fine. Then I realized that I needed to have some pages unsecure. I then created 2 directories. One named Secure and the other named Public. I placed my web.config file in my
2
1725
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. Place a textbox and a button in the login.aspx form. 5. Have the following code in the button click event. if (true) { FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, false)
4
2746
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 must log in again. This is the behavior I expected. I just discovered that if I have a browser window open (to anything) prior to opening my web app in a new browser window, it appears to share session information. I can then open and close my...
3
4870
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 protected by forms authentication. When I create forms authentication at root level it works but when I move my code up to the subfolder I get this error: Server Error in '/TestProjects/FormsAuthenticationTestingArea' Application.
9
4637
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 server. This is going to hold all account related information for the customers and will also be used for admin The login is implemented using forms authentication and i was just reading up about that... but as everyone already knows.... its all...
1
3508
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 web.config file is configured as such: <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" name="myApplication"/> </authentication>
5
2877
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 to manually authenticate users to provide acess My project has 2 web.config files... the default file <authentication mode="Forms"><forms loginUrl="Login.aspx" protection="All" timeout="30"...
7
2046
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 the app. Here is the web.config: <location path="Admin"> <system.web> <authentication mode="Forms"> <forms name="authAdmin" loginUrl="Login.aspx" protection="All" timeout="30"> <credentials passwordFormat="Clear"> <user name="Admin"...
1
6451
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. This app uses forms authentication and denies all unauthenticated users. There is a location override in the web.config so that we can open up a directory for unauthenticated users to create a login account. There is only 1 web.config in the...
4
424
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: <configuration> <system.web> <customErrors mode="Off"/>
0
8997
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8257
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6801
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4709
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3320
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
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2218
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.