Last post Oct 20, 2007 05:22 PM by EYSpeed
Oct 19, 2007 07:25 PM|EYSpeed|LINK
Hey guys and gals -
I had an odd issue pop up in the last week or two. You can go to the login of my page and log in. If you provide invalid credentials, it tells you and leaves you at the login screen. If you login with valid credentials, it redirects you to default.aspx
as it should, but you are not logged in. The login status still displays the login link and the links on the sitemap that
should be there are not. I don't believe I have changed anything, but it's possible. Has anyone seen this behavior before?
<removed for the sake of security>
<pages theme="Black" />
<add assembly="System.Design, Version=18.104.22.168, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<forms loginUrl="Login.aspx" protection="Validation" timeout="5000000" domain="mayodev.com/GavinJones" />
<membership defaultProvider="DefaultMembershipProvider" userIsOnlineTimeWindow="5000000">
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
<roleManager enabled="true" />
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
description="SiteMap provider which reads in .sitemap XML files."
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
<!-- At present the mail settings section is not being used. However, it is required for implementing
password recovery which I have not implemented. -->
<network host="smtp.comcast.net" userName="#####" password="########" />
<allow roles="Administrators,Registered Users"/>
<!-- The Album Path needs to be in the form of "~/FolderName"
When the application creates an album to store photos in, it will create the album inside the folder
specified here. -->
<add key="AlbumsFolder" value="~/Albums" />
<!-- This key specifies the folder to use for Uploads. At this time there is at least one stored procedure that
still references the upload folder statically. Once that is changed you would be able to specify any folder
here that the application should use for working with Uploaded photos that have not been imported to an album.-->
<add key="UploadFolder" value="~/Upload" />
<!-- This key defines what role a new user will be assigned to by default. If set to blank, the user will be
created but not assigned to any roles. The user would then need to be assigned to a role by the administrator
before they would have an special access to the website.-->
<add key="DefaultRoleForNewUser" value="Friends"/>
<!-- This key defines the theme that will be used on the admin pages. I created this setting because it will
reduce the time it takes to create a new theme if you don't have to create all new buttons and css to go with
administration pages. I found it easier just to have the admin sections use the White theme. If left blank the
admin pages will use whatever theme is selected for the site. -->
<add key="AdminTheme" value="White"/>
<!-- This key defines the user account to be notified when a new user has signed up -->
<add key="NotifyAccount" value="Administrator"/>
<!-- This key defines the email address to send errors to. It is defined here in case the error is generated
as a result of a database connection in which we would not be able to retrieve the admin email -->
<add key="AdminEmail" value="firstname.lastname@example.org"/>
Oct 20, 2007 03:53 AM|crf250guy|LINK
I have seen that behavior when accidentally damaging your SQL database. Have you made any changes lately? If you have, do you have a recent backup copy?
Oct 20, 2007 07:33 AM|anas|LINK
<authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="Validation" timeout="5000000" domain="mayodev.com/GavinJones" /> </authentication>
hi i think its a cookies issues,since you are setting the timeout of authentication cookie to
try to delete the browser cookies , and try .
if still have a problem ,
add a break point to the login page load event and after you submit the login credantails ,
see what is the vale of me.user.identity.isauthenticated ?
is is true ?
Oct 20, 2007 05:15 PM|EYSpeed|LINK
Thanks for the answers.
No changes to the SQL. And I thought it was a cookies thing at first too, but I've cleared my cookies and history and no luck. I even tried logging in from a machine that had never been to the site before and had the same problem. I see the same behavior
in VWD that I see in production. Any other ideas?
Oct 20, 2007 05:22 PM|EYSpeed|LINK
Here is the login.aspx.vb. Unfortunately, I don't see anything testing to see if the user is logged in.
Partial Class Login
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
Dim tmpTextbox As New TextBox
Dim tmpLogin As New System.Web.UI.WebControls.Login
tmpLogin = CType(LoginArea.FindControl("Login1"), System.Web.UI.WebControls.Login)
If Not tmpLogin Is Nothing Then
tmpTextbox = CType(tmpLogin.FindControl("UserName"), TextBox)
If Not tmpTextbox Is Nothing Then