CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 12/13/2006 1:39:48 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 26 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
6 Items, 1 Pages 1 |< << Go >> >|
ramya.prasad
Asp.Net User
Problem with LoginStatus control12/13/2006 1:39:48 AM

0/0

Hi,

I am using forms authentication in my web application and ActiveDirectory membership providers.

I am using a login control and a login status control. The authentication seems to be working correctly  but the text in the loginstatus control does not change to "logout", it still says "login".

It works correctly when i run it from VS 2005 but does not work after deploying. IIS authentication is set to "allow anonymous access".

Any help would be appreciated.

Thanks 

 

 

adnansnet
Asp.Net User
Re: Problem with LoginStatus control12/13/2006 7:19:16 AM

0/0

Hello,

Where are you deploying your project? Make sure database is also attached with your deployed project.
Because, In asp.net 2.0 memberships are stored in SQL Server 2005 Express Edition.

Make sure your membership database (ASPNETDB.MDF) will exist on "App_Data" folder.

 


AdNAN...
www.suaba.com
ramya.prasad
Asp.Net User
Re: Problem with LoginStatus control12/13/2006 7:05:00 PM

0/0

Hi

Thanks for the reply.

I am not using SQL server express to store memberships instead connecting to a Active Directory store using the LDAP connection string.

More over the application does not have app_data folder but it works when i run it from VS 2005, its only when i open it from IIS, it doesnt work.

thanks

 

Iori_Jay
Asp.Net User
Re: Problem with LoginStatus control12/14/2006 6:19:08 AM

0/0

ramya.prasad:

Hi,

I am using forms authentication in my web application and ActiveDirectory membership providers.

I am using?a login control and a login status control. The?authentication seems to be working correctly ?but the text in the loginstatus control does not change to "logout", it still says "login".


How do you know it works? Maybe the user?is never?able?to log in and just visit the page as anonymous users. Check the identity of the user when visiting the deployed website under IIS:

Response.Write(User.Identity.Name);

You can also deny access for anonymous users to see whether the users can still view restricted pages.
<authorization>
<deny users="?"/>
</authorization>


Welcome to my SQL/ASPNET forum for Chinese
http://51up.org/bbs/forumdisplay.php?fid=38
ramya.prasad
Asp.Net User
Re: Problem with LoginStatus control12/14/2006 6:02:08 PM

0/0

Hi,

I checked the identity like you said,

well... looks like User.Identity.Name even after authentication is empty. This is a bit confusing because, in the login control's authenticate event, i am checking for the validity of the user, here is the line of code:

    protected void login_Authenticate(object sender, AuthenticateEventArgs e)
    {
        if (Membership.ValidateUser(login.UserName, login.Password))
        {
            e.Authenticated = true;
            FormsAuthentication.RedirectFromLoginPage(login.UserName, false);
        }
        else
        {
            e.Authenticated = false;
        }
    }

It does validate the user because it redirects me to the correct url and morover if i type in the wrong username or password, i get login error which looks good. But once the user is authenticated and goes to the default page the Identity is empty and the User.Identity.IsAuthentcated is showing as false.

Anything missng in this? 

 

Iori_Jay
Asp.Net User
Re: Problem with LoginStatus control12/22/2006 2:36:52 AM

0/0

Sounds like after being redirected to the default page, the user actually visits the page using anonymous access. You can try to directly access the default page without logging in. Not sure why the user is still unauthenticated after loggin in, can you post login related code in the login page, as well as authentication related section in web.config?
Welcome to my SQL/ASPNET forum for Chinese
http://51up.org/bbs/forumdisplay.php?fid=38
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Visual Web Developer 2005 Express Edition For Dummies Authors: Alan Simpson, Pages: 358, Published: 2005
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
ASP.NET 2.0 Cookbook Authors: Michael A. Kittel, Geoffrey T. Leblond, Pages: 989, Published: 2005
Professional ASP.NET 2.0 Security, Membership, and Role Management Authors: Stefan Schackow, Pages: 611, Published: 2006
Expert C# 2005 Business Objects Authors: Rockford Lhotka, Pages: 668, Published: 2006
Hack Attacks Testing: How to Conduct Your Own Security Audit Authors: John Chirillo, Pages: 540, Published: 2003
1997 Hawaii International Conference on System Sciences: 1997 Authors: IEEE Computer Society, IEEE, IEEE Computer Society, Yale N. Patt, Hesham El-Rewini, Pages: 766, Published: 1997
Linksys Networks: The Official Guide Authors: Kathy Ivens, Larry Seltzer, Pages: 448, Published: 2003
Computer Networking Symposium: Proceedings, Loews L'enfant Plaza, Washington, DC, November 17-18, 1986 : a Symposium Authors: IEEE Computer Society Technical Committee on Computer Communications, Pages: 245, Published: 1986
Hack Attacks Denied: A Complete Guide to Network Lockdown Authors: John Chirillo, Pages: 491, Published: 2001

Web:
problems with using LoginStatus on master page - .NET ASP I've placed a LoginStatus control on a master page (so I don't need to .... controls on separate pages will help because there is a problem ...
LoginStatus Class (System.Web.UI.WebControls) The LoginStatus control has two states, logged in to the Web site and logged out of the Web site, determined by the IsAuthenticated property of the Page ...
Logout Problem in Login Status Control - ASP.NET Forums Logout Problem in Login Status Control. Last post 07-23-2008 1:35 AM by bijaya. pathia. 2 replies. Sort Posts: ...
LoginStatus control not rendered - ng.asp-net-forum.security - Fix ... Login control + ASP.NET + works in Firefox, not in IE ... LoginStatus control and a few other controls also cause problems in IE and not in Firefox. ...
ASP.NET 2.0 LoginStatus control does not clear Session on Logout NET 2.0 web application and discovered that the LoginStatus control does not clear ... Problem: Midway through the project, I noticed that this Session ...
Login Status Control in ASP.NET 3.5 Oct 10, 2008 ... This article shows how to use LoginStatus control in ASP.NET 3.5. ... ActuallyI am a beigner in .net so facing a lot of problem. ...
Logout Problem in Login Status Control - ASP.NET Forums Logout Problem in Login Status Control. Last post 07-23-2008 1:35 AM by bijaya. pathia. 2 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
problems with using LoginStatus on master page problems with using LoginStatus on master page. hey asp.net 2.0 I've placed a LoginStatus control on a master page (so I don't need to have ...
LoginStatus Control, asp:LoginStatus Control How to use LoginStatus control in asp.net? Working with LoginStatus control in ASP.NET.
LoginStatus Control Adapter: ASP.NET 2.0 CSS Friendly Control ... The LoginStatus control renders just a single tag whose CSS class can be set using the LoginStatus' CssClass property. In the unadapted form, ...

Videos:
Asp.Net 2.0 Membership II LoginStatus and LoginView Control - Shalvin Asp.Net 2.0 Membership II LoginStatus and LoginView Control - Shalvin Coordinator Cochin .Net User Group.
ASP.Net 2.0 Membership II : LoginView Control - Shalvin Microsoft ASP.Net 2.0 Membership II LoginView Control (With Voice) - Shalvin Also view : Membership I : LoginStatus LoginName http://www.youtube.co...




Search This Site:










cookies and logout page

how to solve "error creating assembly manifest: bad version of provider. "

.net 1.1 windowsidentity object question

help with project

ebay integration

overrides the getallusers wo parameters

to access project file variable

how to open a new window from button's click event.

feature request: associations made properly

css vs master pages

looking for an web application framework

asp.net smtp client help - bad recipient!

changing membership passwords

can i not put html formating tags in a stringbuilder?

quick access db question

how to edit an existing website

sharepoint services and dnn.

hi - a sql security question - and a suggestion for f.a.q.

asp domain problem

failure sending mail.

problem with app_localresources folder

error trying to create a virtual directory

new site log (with install script)

how to transfer preconfigured dnn site to its deployment site?

cannot post a form in production environment - newbie to .net

help with address user control

make changes in parent page from control

how can i find out which page i have just come from after using response.redirect???

navigation drop down menu

how to run a thread during closing...

 
All Times Are GMT