Why is ASP.NET FormsAuthentication cookie not authenticating user?
问题 I have a site that uses the default SqlMembershipProvider and FormsAuthentication. I can use the built-in Login Controls and/or programmatically call all the methods to authenticate a user and get the same result - the user is authenticated and a cookie is created, but the cookie does not appear to be valid since I can't get into any page that requires authentication. There is no real code to show for the default Login Control since it should just "work", but here is the custom code I tried: